10-config 869 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/with-contenv bash
  2. if [[ -z $JICOFO_COMPONENT_SECRET || -z $JICOFO_AUTH_PASSWORD ]]; then
  3. echo 'FATAL ERROR: Jicofo component secret and auth password must be set'
  4. exit 1
  5. fi
  6. OLD_JICOFO_COMPONENT_SECRET=s3cr37
  7. if [[ "$JICOFO_COMPONENT_SECRET" == "$OLD_JICOFO_COMPONENT_SECRET" ]]; then
  8. echo 'FATAL ERROR: Jicofo component secret must be changed, check the README'
  9. exit 1
  10. fi
  11. OLD_JICOFO_AUTH_PASSWORD=passw0rd
  12. if [[ "$JICOFO_AUTH_PASSWORD" == "$OLD_JICOFO_AUTH_PASSWORD" ]]; then
  13. echo 'FATAL ERROR: Jicofo auth password must be changed, check the README'
  14. exit 1
  15. fi
  16. if [[ ! -f /config/sip-communicator.properties ]]; then
  17. tpl /defaults/sip-communicator.properties > /config/sip-communicator.properties
  18. fi
  19. if [[ ! -f /config/logging.properties ]]; then
  20. cp /defaults/logging.properties /config
  21. fi
  22. chown -R jicofo:jitsi /config