Files
jitsi-meet-deployment/web/rootfs/etc/cont-init.d/10-config
Saúl Ibarra Corretgé 1010c71b33 core: rework templating
Use frep [0] which uses the Go templating capabilities.

[0]: https://github.com/subchen/frep
2018-08-09 21:43:54 +02:00

33 lines
898 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/with-contenv bash
# make our folders
mkdir -p \
/config/{nginx/site-confs,keys} \
/run \
/var/lib/nginx/tmp/client_body \
/var/tmp/nginx
# copy config files
if [[ ! -f /config/nginx/nginx.conf ]]; then
cp /defaults/nginx.conf /config/nginx/nginx.conf
fi
if [[ ! -f /config/nginx/site-confs/default ]]; then
tpl /defaults/default > /config/nginx/site-confs/default
fi
if [[ ! -f /config/config.js ]]; then
cp /defaults/config.js /config/config.js
sed -i \
-e "s#jitsi-meet.example.com#$XMPP_DOMAIN#g" \
-e "s#bosh:.*#bosh: '/http-bind',#" \
-e "s#muc:.*#muc: '${XMPP_MUC_DOMAIN}',#" \
-e "s#// focusUserJid:.*#focusUserJid: '${JICOFO_AUTH_USER}@${XMPP_AUTH_DOMAIN}',#" \
/config/config.js
fi
if [[ ! -f /config/interface_config.js ]]; then
cp /defaults/interface_config.js /config/interface_config.js
fi