19 lines
702 B
Bash
19 lines
702 B
Bash
#!/bin/bash
|
|
|
|
if [[ ! -f /data/homeserver.yaml ]]; then
|
|
/start.py generate
|
|
|
|
apt update && apt install -y wget
|
|
wget https://github.com/mikefarah/yq/releases/download/3.3.2/yq_linux_amd64 && \
|
|
chmod +x yq_linux_amd64 && \
|
|
mv yq_linux_amd64 /bin/yq
|
|
|
|
# turn (https://github.com/matrix-org/synapse/blob/master/docs/turn-howto.md#synapse-setup)
|
|
yq w -i /data/homeserver.yaml turn_uris "[]"
|
|
yq w -i /data/homeserver.yaml turn_uris\[0\] "turn:${TURN_SERVER}:${TURN_PORT}?transport=udp"
|
|
yq w -i /data/homeserver.yaml turn_uris\[1\] "turn:${TURN_SERVER}:${TURN_PORT}?transport=tcp"
|
|
yq w -i /data/homeserver.yaml coturn_shared_secret "$(tr -d \"\n\" < /run/secrets/coturn_shared_secret)"
|
|
fi
|
|
|
|
/start.py
|