This commit is contained in:
bel
2021-09-14 06:30:17 -06:00
commit 7ab1723a5e
327 changed files with 127104 additions and 0 deletions

45
matrix/entrypoint.sh Executable file
View File

@@ -0,0 +1,45 @@
#! /bin/bash
function main() {
case "$1" in
start )
start-synapse &
start-riot &
service jicofo start
service jitsi-videobridge2 start
service prosody start
service coturn start
service coturn start
service uuidd start
service nginx start
wait -n 1
kill $(jobs -p)
wait
;;
* )
eval "$@"
;;
esac
}
function start-synapse() {
set -e
rm -f /etc/matrix-synapse/conf.d/server_name.yaml
source /etc/default/matrix-synapse
cd /var/lib/matrix-synapse
/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver \
--config-path=/etc/matrix-synapse/homeserver.yaml \
--config-path=/etc/matrix-synapse/conf.d/ \
--generate-keys
exec /opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver \
--config-path=/etc/matrix-synapse/homeserver.yaml \
--config-path=/etc/matrix-synapse/conf.d/
}
function start-riot() {
exec /main/exec-simpleserve -p 39988 -d /var/www/riot.dangerousdemos.net/riot
}
if [ "$0" == "$BASH_SOURCE" ]; then
main "$@"
fi