summaryrefslogtreecommitdiff
path: root/debian/config
blob: a9ad49845d7fd8b366c2cdc8ce46bc8c37c342b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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