entrypoint.sh 488 B

1234567891011121314
  1. #!/bin/sh
  2. set -euo pipefail
  3. # Patch config file
  4. echo "Patching config file..."
  5. cd /usr/share/nginx/html/
  6. if [ ! -z "$SALTYRTC_HOST" ]; then
  7. sed -i -E "s/SALTYRTC_HOST:\s*null,/SALTYRTC_HOST:'${SALTYRTC_HOST}',/g" *.bundle.js
  8. fi
  9. sed -i -E "s/SALTYRTC_PORT:\s*[^,]*,/SALTYRTC_PORT:${SALTYRTC_PORT},/g" *.bundle.js
  10. sed -i -E "s/SALTYRTC_SERVER_KEY:\s*\"[^\"]*\",/SALTYRTC_SERVER_KEY:\"${SALTYRTC_SERVER_KEY}\",/g" *.bundle.js
  11. echo "Starting Threema Web..."
  12. exec nginx -g 'daemon off;'