Skip to content

Commit

Permalink
Properly detect first time coturn install and configure it.
Browse files Browse the repository at this point in the history
  • Loading branch information
damencho committed Jan 8, 2020
1 parent 4d81e0c commit 48f34b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion debian/jitsi-meet-turnserver.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ case "$1" in
fi
TURN_SECRET="$RET"

if [ ! -f $TURN_CONFIG ] ; then
if [[ -f $TURN_CONFIG ]] && ! grep -q "jitsi-meet coturn config" "$TURN_CONFIG" ; then
PUBLIC_IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
cp /usr/share/jitsi-meet-turnserver/turnserver.conf $TURN_CONFIG
sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $TURN_CONFIG
Expand Down Expand Up @@ -84,6 +84,7 @@ case "$1" in
NGINX_STREAM_CONFIG="/etc/nginx/modules-enabled/50-jitsi-meet.conf"
if [ -f $NGINX_STREAM_CONFIG ] ; then
sed -i "s/listen 443 ssl/listen 4444 ssl http2/g" /etc/nginx/sites-available/$JVB_HOSTNAME.conf
invoke-rc.d nginx reload || true
fi
fi

Expand Down
4 changes: 2 additions & 2 deletions doc/debian/jitsi-meet-turn/turnserver.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# jitsi-meet coturn config. Do not modify this line
lt-cred-mech
use-auth-secret
keep-address-family
static-auth-secret=__turnSecret__
realm=jitsi-meet.example.com
listening-port=4445
cert=/etc/jitsi/meet/jitsi-meet.example.com.crt
pkey=/etc/jitsi/meet/jitsi-meet.example.com.key

no-tcp
listening-port=443
tls-listening-port=4444
tls-listening-port=4445
external-ip=__external_ip_address__

0 comments on commit 48f34b1

Please sign in to comment.