init server_name to be the sld

This commit is contained in:
Girish Ramakrishnan
2020-04-08 18:32:30 -07:00
parent 1492b16fdd
commit 6a21388e95
2 changed files with 5 additions and 2 deletions

View File

@@ -23,11 +23,14 @@ if [[ ! -f /app/data/configs/homeserver.yaml ]]; then
mv /app/data/configs/${CLOUDRON_APP_DOMAIN}.signing.key /app/data/configs/signing.key
# this is set at installation time and not changed after
server_name=$(python -c "from publicsuffix2 import get_sld; print(get_sld('${CLOUDRON_APP_DOMAIN}'));")
yq w -i /app/data/configs/homeserver.yaml server_name "${CLOUDRON_APP_DOMAIN}"
yq w -i /app/data/configs/homeserver.yaml registration_shared_secret "$(pwgen -1s 64)"
fi
echo "==> Configuring synapse"
yq w -i /app/data/configs/homeserver.yaml server_name "${CLOUDRON_APP_DOMAIN}"
yq w -i /app/data/configs/homeserver.yaml public_baseurl "${CLOUDRON_APP_ORIGIN}"
# tls