summaryrefslogtreecommitdiff
path: root/debian/config
diff options
context:
space:
mode:
authorPaul van Tilburg <paul@luon.net>2020-11-13 20:35:22 +0100
committerPaul van Tilburg <paul@luon.net>2020-11-24 14:42:18 +0100
commitf72554de1014eea6b5c224548e9d0aeb15553cf7 (patch)
tree8aa4d15c8a575069a80e8aa448ab48528bb7ed3c /debian/config
parent79692db45dfe2fec6d0fec280bfba2be740d58a5 (diff)
downloadconduit-f72554de1014eea6b5c224548e9d0aeb15553cf7.zip
Split config into a Debian and local part
* The Debian part will be generated and managed by Debconf and configure homeserver name, address and port * The local part will just be a config file that shows the other configuration options Added the address configuration and moved the config generation from the config to the postinst script.
Diffstat (limited to 'debian/config')
-rw-r--r--debian/config14
1 files changed, 4 insertions, 10 deletions
diff --git a/debian/config b/debian/config
index a9ad498..8710ef9 100644
--- a/debian/config
+++ b/debian/config
@@ -4,20 +4,14 @@ 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.
+# Ask for the Matrix homeserver name, address and port.
db_input high matrix-conduit/hostname || true
db_go
-db_input medium matrix-conduit/port || true
+db_input low matrix-conduit/address || 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
+db_input medium matrix-conduit/port || true
+db_go
exit 0