10-config 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/with-contenv bash
  2. if [[ -z $JVB_AUTH_PASSWORD ]]; then
  3. echo 'FATAL ERROR: JVB auth password must be set'
  4. exit 1
  5. fi
  6. OLD_JVB_AUTH_PASSWORD=passw0rd
  7. if [[ "$JVB_AUTH_PASSWORD" == "$OLD_JVB_AUTH_PASSWORD" ]]; then
  8. echo 'FATAL ERROR: JVB auth password must be changed, check the README'
  9. exit 1
  10. fi
  11. # On environments like Swarm the IP address used by the default gateway need not be
  12. # the one used for inter-container traffic. Use that one for our fallback ID.
  13. XMPP_SERVER_IP=$(dig +short ${XMPP_SERVER})
  14. export JVB_WS_SERVER_ID_FALLBACK=$(ip route get ${XMPP_SERVER_IP} | grep -oP '(?<=src ).*' | awk '{ print $1 '})
  15. # Local IP for the ice4j mapping harvester.
  16. export LOCAL_ADDRESS=$(ip route get 1 | grep -oP '(?<=src ).*' | awk '{ print $1 '})
  17. export SENTRY_RELEASE="${SENTRY_RELEASE:-$(apt-cache policy jitsi-videobridge2 | sed -n '/Installed/p' | sed -e 's/[^:]*: //')}"
  18. if [[ -f /config/custom-sip-communicator.properties ]]; then
  19. cat /config/custom-sip-communicator.properties > /config/sip-communicator.properties
  20. fi
  21. tpl /defaults/logging.properties > /config/logging.properties
  22. tpl /defaults/jvb.conf > /config/jvb.conf
  23. chown -R jvb:jitsi /config