diff options
author | Paul van Tilburg <paul@luon.net> | 2020-05-31 22:49:07 +0200 |
---|---|---|
committer | Paul van Tilburg <paul@luon.net> | 2020-11-24 14:38:15 +0100 |
commit | 79692db45dfe2fec6d0fec280bfba2be740d58a5 (patch) | |
tree | 450e5e055c578310a0c060c927e8afc4f54bc980 /debian/config | |
parent | 18f33b1ece291797f22b27e186f93b21a423341c (diff) | |
download | conduit-79692db45dfe2fec6d0fec280bfba2be740d58a5.zip |
First version of cargo-deb packaging setup
Diffstat (limited to 'debian/config')
-rw-r--r-- | debian/config | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/config b/debian/config new file mode 100644 index 0000000..a9ad498 --- /dev/null +++ b/debian/config @@ -0,0 +1,23 @@ +#!/bin/sh +set -e + +# Source debconf library. +. /usr/share/debconf/confmodule + +CONDUIT_CONFIG_PATH=/etc/matrix-conduit +CONDUIT_CONFIG_FILE="$CONDUIT_CONFIG_PATH/env" + +# Ask for the Matrix homeserver name and port. +db_input high matrix-conduit/hostname || true +db_go + +db_input medium matrix-conduit/port || true +db_go + +# Update the values in the config. +db_get matrix-conduit/hostname +sed -i -e "s/^ROCKET_SERVER_NAME=.*/ROCKET_SERVER_NAME=\"$RET\"/" $CONDUIT_CONFIG_FILE +db_get matrix-conduit/port +sed -i -e "s/^ROCKET_PORT=.*/ROCKET_PORT=\"$RET\"/" $CONDUIT_CONFIG_FILE + +exit 0 |