jvb: simplify setting NAT options

pull/18/head
Saúl Ibarra Corretgé 6 years ago
parent e8fde8cb8c
commit 0014a19c2f
  1. 2
      jvb/rootfs/defaults/sip-communicator.properties
  2. 9
      jvb/rootfs/etc/cont-init.d/10-config
  3. 6
      jvb/rootfs/etc/services.d/jvb/run

@ -2,5 +2,3 @@ org.jitsi.videobridge.AUTHORIZED_SOURCE_REGEXP={{ .Env.JICOFO_AUTH_USER }}@{{ .E
org.jitsi.videobridge.SINGLE_PORT_HARVESTER_PORT={{ .Env.JVB_PORT }}
org.jitsi.videobridge.DISABLE_TCP_HARVESTER=true
org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES={{ .Env.JVB_STUN_SERVERS }}
org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=
org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=

@ -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

@ -1,6 +1,12 @@
#!/usr/bin/with-contenv bash
JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/ -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=config -Djava.util.logging.config.file=/config/logging.properties"
if [[ ! -z "$DOCKER_HOST_ADDRESS" ]]; then
LOCAL_ADDRESS=$(hostname -I | cut -d " " -f1)
JAVA_SYS_PROPS="$JAVA_SYS_PROPS -Dorg.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=$LOCAL_ADDRESS -Dorg.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=$DOCKER_HOST_ADDRESS"
fi
DAEMON=/usr/share/jitsi-videobridge/jvb.sh
DAEMON_OPTS="--domain=$XMPP_DOMAIN --host=$XMPP_SERVER --port=5347 --secret=$JVB_COMPONENT_SECRET"

Loading…
Cancel
Save