Environment variables for subdomains

This commit is contained in:
Sara Aimée Smiseth 2020-06-01 07:25:31 +02:00
parent 32fbf2c8db
commit b3d3eee131
4 changed files with 31 additions and 9 deletions

View file

@ -10,4 +10,13 @@ if [ "$LOCAL" -a "$PASSWORD" -a "$DOMAIN" ] ; then
prosodyctl register $LOCAL $DOMAIN $PASSWORD
fi
exec "$@"
if [ -z "$DOMAIN" ]; then
echo "[ERROR] DOMAIN must be set!"
exit 1
fi
export DOMAIN_HTTP_UPLOAD=${DOMAIN_HTTP_UPLOAD:-"upload.$DOMAIN"}
export DOMAIN_MUC=${DOMAIN_MUC:-"conference.$DOMAIN"}
export DOMAIN_PROXY=${DOMAIN_PROXY:-"proxy.$DOMAIN"}
exec "$@"