Initial version
This commit is contained in:
29
start_matrix.sh
Executable file
29
start_matrix.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
|
||||
if [[ ! -d /app/data/synapse ]]; then
|
||||
echo "=> Detected first run"
|
||||
mkdir -p /app/data/synapse
|
||||
cd /app/data/synapse
|
||||
python -m synapse.app.homeserver \
|
||||
--server-name ${APP_DOMAIN#*.} \
|
||||
--config-path homeserver.yaml \
|
||||
--report-stats=no \
|
||||
--generate-config
|
||||
fi
|
||||
|
||||
if [[ ! -e /app/data/riot_config.json ]]; then
|
||||
cp /app/code/config.sample.json /app/data/riot_config.json
|
||||
sed -i "s#https://matrix.org#https://$APP_DOMAIN#" /app/data/riot_config.json
|
||||
fi
|
||||
|
||||
mkdir -p /app/data/nginx
|
||||
mkdir -p /app/data/nginx_log
|
||||
|
||||
chown -R www-data.www-data /app/data
|
||||
|
||||
cd /app/data/synapse
|
||||
gosu www-data python -m synapse.app.homeserver --config-path homeserver.yaml &> /dev/null &
|
||||
|
||||
exec /usr/sbin/nginx -g 'daemon off;'
|
||||
Reference in New Issue
Block a user