Files
jitsi-meet-deployment/jvb/rootfs/etc/cont-init.d/10-config
Saúl Ibarra Corretgé 1010c71b33 core: rework templating
Use frep [0] which uses the Go templating capabilities.

[0]: https://github.com/subchen/frep
2018-08-09 21:43:54 +02:00

20 lines
761 B
Plaintext

#!/usr/bin/with-contenv bash
if [[ ! -f /config/sip-communicator.properties ]]; then
tpl /defaults/sip-communicator.properties > /config/sip-communicator.properties
fi
if [[ ! -f /config/logging.properties ]]; then
cp /defaults/logging.properties /config
fi
# Do this for every run, since the local IP may change!
if [[ ! -z "$DOCKER_HOST_ADDRESS" ]]; then
LOCAL_ADDRESS=$(hostname -I | cut -d " " -f1)
sed -i \
-e "s,^org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=.*,org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=$LOCAL_ADDRESS," \
-e "s,^org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=.*,org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=$DOCKER_HOST_ADDRESS," \
/config/sip-communicator.properties
fi