Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fix turn file link (#5601)

Дамян Минковb372b2ccf233
diff --git a/debian/jitsi-meet-turnserver.links b/debian/jitsi-meet-turnserver.links
deleted file mode 100644
index 9518f96ac1..0000000000
--- a/debian/jitsi-meet-turnserver.links
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/jitsi-meet-turnserver/jitsi-meet.conf /etc/nginx/modules-enabled/60-jitsi-meet.conf
diff --git a/debian/jitsi-meet-turnserver.postinst b/debian/jitsi-meet-turnserver.postinst
index 1526f73333..07b4424236 100644
--- a/debian/jitsi-meet-turnserver.postinst
+++ b/debian/jitsi-meet-turnserver.postinst
@@ -46,14 +46,22 @@ case "$1" in
# check whether other enabled hosts has listen 443
if cat ${site} | grep -v "^[[:space:]]*#" | grep listen | grep -q "^.*[[:space:]:]443[;[:space:]].*" ; then
# nothing to do
+ echo "------------------------------------------------"
echo ""
echo "turnserver not configured as other nginx sites use port 443"
echo ""
+ echo "------------------------------------------------"
db_stop
exit 0
fi
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
db_get jitsi-meet-turnserver/jvb-hostname
JVB_HOSTNAME_OLD=$RET
@@ -67,17 +75,21 @@ case "$1" in
db_get jitsi-meet/jvb-serve || true
if [ ! -f $NGINX_CONFIG -o "$RET" = "true" ] ; then
# nothing to do
+ echo "------------------------------------------------"
echo ""
echo "turnserver not configured as no nginx found to multiplex traffic"
echo ""
+ echo "------------------------------------------------"
db_stop
exit 0
fi
if [[ -f $TURN_CONFIG ]] ; then
+ echo "------------------------------------------------"
echo ""
echo "turnserver is already configured on this machine, skipping."
echo ""
+ echo "------------------------------------------------"
db_stop
exit 0
fi
@@ -130,7 +142,8 @@ case "$1" in
invoke-rc.d coturn restart || true
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
invoke-rc.d nginx reload || true
diff --git a/debian/jitsi-meet-turnserver.postrm b/debian/jitsi-meet-turnserver.postrm
index aad705a026..90ef725743 100644
--- a/debian/jitsi-meet-turnserver.postrm
+++ b/debian/jitsi-meet-turnserver.postrm
@@ -24,6 +24,7 @@ set -e
case "$1" in
remove)
+ rm -rf /etc/nginx/modules-enabled/60-jitsi-meet.conf
if [ -x "/etc/init.d/nginx" ]; then
invoke-rc.d nginx reload || true
fi
@@ -32,6 +33,8 @@ case "$1" in
fi
;;
purge)
+ rm -rf /etc/nginx/modules-enabled/60-jitsi-meet.conf
+ rm -rf /etc/turnserver.conf
if [ -x "/etc/init.d/nginx" ]; then
invoke-rc.d nginx reload || true
fi