Fix turn file link (#5601)
* debian: Does not add a link of turnserver will not be configured. Fixes #5596.
* debian: Partially reverts 990c77bd
.
* debian: Skip filename duplication, use variable.
This commit is contained in:
parent
d00ead932b
commit
b372b2ccf2
|
@ -1 +0,0 @@
|
||||||
/usr/share/jitsi-meet-turnserver/jitsi-meet.conf /etc/nginx/modules-enabled/60-jitsi-meet.conf
|
|
|
@ -46,14 +46,22 @@ case "$1" in
|
||||||
# check whether other enabled hosts has listen 443
|
# check whether other enabled hosts has listen 443
|
||||||
if cat ${site} | grep -v "^[[:space:]]*#" | grep listen | grep -q "^.*[[:space:]:]443[;[:space:]].*" ; then
|
if cat ${site} | grep -v "^[[:space:]]*#" | grep listen | grep -q "^.*[[:space:]:]443[;[:space:]].*" ; then
|
||||||
# nothing to do
|
# nothing to do
|
||||||
|
echo "------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
echo "turnserver not configured as other nginx sites use port 443"
|
echo "turnserver not configured as other nginx sites use port 443"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "------------------------------------------------"
|
||||||
db_stop
|
db_stop
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# if there was a turn config backup it so we can configure
|
||||||
|
# we cannot recognize at the moment is this a user config or default config when installing coturn
|
||||||
|
if [[ -f $TURN_CONFIG ]] && ! grep -q "jitsi-meet coturn config" "$TURN_CONFIG" ; then
|
||||||
|
mv $TURN_CONFIG $TURN_CONFIG.bak
|
||||||
|
fi
|
||||||
|
|
||||||
# detect dpkg-reconfigure, just delete old links
|
# detect dpkg-reconfigure, just delete old links
|
||||||
db_get jitsi-meet-turnserver/jvb-hostname
|
db_get jitsi-meet-turnserver/jvb-hostname
|
||||||
JVB_HOSTNAME_OLD=$RET
|
JVB_HOSTNAME_OLD=$RET
|
||||||
|
@ -67,17 +75,21 @@ case "$1" in
|
||||||
db_get jitsi-meet/jvb-serve || true
|
db_get jitsi-meet/jvb-serve || true
|
||||||
if [ ! -f $NGINX_CONFIG -o "$RET" = "true" ] ; then
|
if [ ! -f $NGINX_CONFIG -o "$RET" = "true" ] ; then
|
||||||
# nothing to do
|
# nothing to do
|
||||||
|
echo "------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
echo "turnserver not configured as no nginx found to multiplex traffic"
|
echo "turnserver not configured as no nginx found to multiplex traffic"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "------------------------------------------------"
|
||||||
db_stop
|
db_stop
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f $TURN_CONFIG ]] ; then
|
if [[ -f $TURN_CONFIG ]] ; then
|
||||||
|
echo "------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
echo "turnserver is already configured on this machine, skipping."
|
echo "turnserver is already configured on this machine, skipping."
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "------------------------------------------------"
|
||||||
db_stop
|
db_stop
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -130,7 +142,8 @@ case "$1" in
|
||||||
invoke-rc.d coturn restart || true
|
invoke-rc.d coturn restart || true
|
||||||
|
|
||||||
NGINX_STREAM_CONFIG="/etc/nginx/modules-enabled/60-jitsi-meet.conf"
|
NGINX_STREAM_CONFIG="/etc/nginx/modules-enabled/60-jitsi-meet.conf"
|
||||||
if [ -f $NGINX_STREAM_CONFIG ] && [ -f $NGINX_CONFIG ] ; then
|
if [ ! -f $NGINX_STREAM_CONFIG ] && [ -f $NGINX_CONFIG ] ; then
|
||||||
|
ln -s /usr/share/jitsi-meet-turnserver/jitsi-meet.conf $NGINX_STREAM_CONFIG
|
||||||
sed -i "s/listen 443 ssl/listen 4444 ssl http2/g" $NGINX_CONFIG
|
sed -i "s/listen 443 ssl/listen 4444 ssl http2/g" $NGINX_CONFIG
|
||||||
sed -i "s/listen \[\:\:\]\:443 ssl/listen \[\:\:\]\:4444 ssl http2/g" $NGINX_CONFIG
|
sed -i "s/listen \[\:\:\]\:443 ssl/listen \[\:\:\]\:4444 ssl http2/g" $NGINX_CONFIG
|
||||||
invoke-rc.d nginx reload || true
|
invoke-rc.d nginx reload || true
|
||||||
|
|
|
@ -24,6 +24,7 @@ set -e
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
remove)
|
remove)
|
||||||
|
rm -rf /etc/nginx/modules-enabled/60-jitsi-meet.conf
|
||||||
if [ -x "/etc/init.d/nginx" ]; then
|
if [ -x "/etc/init.d/nginx" ]; then
|
||||||
invoke-rc.d nginx reload || true
|
invoke-rc.d nginx reload || true
|
||||||
fi
|
fi
|
||||||
|
@ -32,6 +33,8 @@ case "$1" in
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
purge)
|
purge)
|
||||||
|
rm -rf /etc/nginx/modules-enabled/60-jitsi-meet.conf
|
||||||
|
rm -rf /etc/turnserver.conf
|
||||||
if [ -x "/etc/init.d/nginx" ]; then
|
if [ -x "/etc/init.d/nginx" ]; then
|
||||||
invoke-rc.d nginx reload || true
|
invoke-rc.d nginx reload || true
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue