Does not override prosody config on update.
This commit is contained in:
parent
a8108aac5f
commit
9d98b3a29e
|
@ -23,12 +23,20 @@ case "$1" in
|
||||||
|
|
||||||
. /etc/default/jitsi-videobridge
|
. /etc/default/jitsi-videobridge
|
||||||
|
|
||||||
if [ -f /etc/prosody/prosody.cfg.lua ]; then
|
PROSODY_CONFIG_PRESENT="true"
|
||||||
mv /etc/prosody/prosody.cfg.lua /etc/prosody/prosody.cfg.lua.orig
|
if [ ! -f /etc/prosody/prosody.cfg.lua ]; then
|
||||||
|
PROSODY_CONFIG_PRESENT="false"
|
||||||
|
gunzip -c /usr/share/doc/jitsi-meet-prosody/prosody.cfg.lua-jvb.example.gz > /etc/prosody/prosody.cfg.lua
|
||||||
fi
|
fi
|
||||||
gunzip -c /usr/share/doc/jitsi-meet-prosody/prosody.cfg.lua-jvb.example.gz > /etc/prosody/prosody.cfg.lua
|
|
||||||
sed -i "s/jitmeet.example.com/$JVB_HOSTNAME/g" /etc/prosody/prosody.cfg.lua
|
if [ ! grep "VirtualHost \"$JVB_HOSTNAME\"" /etc/prosody/prosody.cfg.lua > /dev/null ]; then
|
||||||
sed -i "s/jitmeetSecret/$JVB_SECRET/g" /etc/prosody/prosody.cfg.lua
|
if [ "PROSODY_CONFIG_PRESENT" = "true" ]; then
|
||||||
|
mv /etc/prosody/prosody.cfg.lua /etc/prosody/prosody.cfg.lua.orig
|
||||||
|
fi
|
||||||
|
sed -i "s/jitmeet.example.com/$JVB_HOSTNAME/g" /etc/prosody/prosody.cfg.lua
|
||||||
|
sed -i "s/jitmeetSecret/$JVB_SECRET/g" /etc/prosody/prosody.cfg.lua
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f /var/lib/prosody/$JVB_HOSTNAME.crt ]; then
|
if [ ! -f /var/lib/prosody/$JVB_HOSTNAME.crt ]; then
|
||||||
HOST="$( (hostname -s; echo localhost) | head -n 1)"
|
HOST="$( (hostname -s; echo localhost) | head -n 1)"
|
||||||
DOMAIN="$( (hostname -d; echo localdomain) | head -n 1)"
|
DOMAIN="$( (hostname -d; echo localdomain) | head -n 1)"
|
||||||
|
|
|
@ -39,9 +39,9 @@ case "$1" in
|
||||||
chown -R www-data:www-data /usr/share/jitsi-meet/
|
chown -R www-data:www-data /usr/share/jitsi-meet/
|
||||||
sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" /usr/share/jitsi-meet/config.js
|
sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" /usr/share/jitsi-meet/config.js
|
||||||
# enable turn
|
# enable turn
|
||||||
if grep "// useStunTurn: true," /usr/share/jitsi-meet/config.js > /dev/null; then
|
#if grep "// useStunTurn: true," /usr/share/jitsi-meet/config.js > /dev/null; then
|
||||||
sed -i "s/\/\/\ \ useStunTurn:\ true,/\ \ \ \ useStunTurn:\ true,/" /usr/share/jitsi-meet/config.js
|
# sed -i "s/\/\/\ \ useStunTurn:\ true,/\ \ \ \ useStunTurn:\ true,/" /usr/share/jitsi-meet/config.js
|
||||||
fi
|
#fi
|
||||||
invoke-rc.d nginx restart
|
invoke-rc.d nginx restart
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue