jvb: simplify setting NAT options

This commit is contained in:
Saúl Ibarra Corretgé
2018-10-03 07:31:37 +02:00
parent e8fde8cb8c
commit 0014a19c2f
3 changed files with 6 additions and 11 deletions

View File

@@ -8,12 +8,3 @@ 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