24 lines
609 B
Bash
Executable File
24 lines
609 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -euo pipefail
|
|
|
|
source /opt/synapse/venv/bin/activate
|
|
|
|
if [ ! -e "${SYNAPSE_CONFIG}" ]; then
|
|
echo "Generating a default ${SYNAPSE_CONFIG}"
|
|
if [ -z "${SYNAPSE_SERVER_NAME}" ]; then
|
|
echo "You must set SYNAPSE_SERVER_NAME environment variable"
|
|
exit 1
|
|
fi
|
|
envsubst < /opt/synapse/templates/homeserver.yml > ${SYNAPSE_CONFIG}
|
|
fi
|
|
|
|
echo "Generate missing keys if needed"
|
|
python3 -m synapse.app.homeserver \
|
|
--config-path ${SYNAPSE_CONFIG} \
|
|
--generate-missing-configs \
|
|
--report-stats=no \
|
|
--config-directory=/data/conf \
|
|
--keys-directory=/data/conf \
|
|
--data-directory=/data
|