core: rework templating

Use frep [0] which uses the Go templating capabilities.

[0]: https://github.com/subchen/frep
This commit is contained in:
Saúl Ibarra Corretgé
2018-08-09 21:29:58 +02:00
parent 36d98c9e17
commit 1010c71b33
8 changed files with 26 additions and 37 deletions

View File

@@ -1,5 +1,5 @@
org.jitsi.videobridge.AUTHORIZED_SOURCE_REGEXP=${JICOFO_AUTH_USER}@${XMPP_AUTH_DOMAIN}/.*
org.jitsi.videobridge.AUTHORIZED_SOURCE_REGEXP={{ .Env.JICOFO_AUTH_USER }}@{{ .Env.XMPP_AUTH_DOMAIN }}/.*
org.jitsi.videobridge.TCP_HARVESTER_PORT=4443
org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=${JVB_STUN_SERVERS}
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=

View File

@@ -1,13 +1,7 @@
#!/usr/bin/with-contenv bash
if [[ ! -f /config/sip-communicator.properties ]]; then
cp /defaults/sip-communicator.properties /config
sed -i \
-e "s,\${XMPP_DOMAIN},$XMPP_DOMAIN,g" \
-e "s,\${XMPP_AUTH_DOMAIN},$XMPP_AUTH_DOMAIN,g" \
-e "s,\${JICOFO_AUTH_USER},$JICOFO_AUTH_USER,g" \
-e "s#\${JVB_STUN_SERVERS}#$JVB_STUN_SERVERS#g" \
/config/sip-communicator.properties
tpl /defaults/sip-communicator.properties > /config/sip-communicator.properties
fi
if [[ ! -f /config/logging.properties ]]; then