|
@@ -36,6 +36,24 @@ case "$1" in
|
36
|
36
|
NGINX_CONFIG="/etc/nginx/sites-available/$JVB_HOSTNAME.conf"
|
37
|
37
|
JITSI_MEET_CONFIG="/etc/jitsi/meet/$JVB_HOSTNAME-config.js"
|
38
|
38
|
|
|
39
|
+ NGINX_SITES_ENABLED="/etc/nginx/sites-enabled/"
|
|
40
|
+ NGINX_CONFIG_ENABLED="${NGINX_SITES_ENABLED}${JVB_HOSTNAME}.conf"
|
|
41
|
+ for site in ${NGINX_SITES_ENABLED}*; do
|
|
42
|
+ # if it is not a file continue
|
|
43
|
+ [ -f "${site}" ] || continue
|
|
44
|
+ # if it is our config skip
|
|
45
|
+ [ "${site}" != "${NGINX_CONFIG_ENABLED}" ] || continue
|
|
46
|
+ # check whether other enabled hosts has listen 443
|
|
47
|
+ if cat ${site} | grep -v "^[[:space:]]*#" | grep listen | grep -q "^.*[[:space:]:]443[;[:space:]].*" ; then
|
|
48
|
+ # nothing to do
|
|
49
|
+ echo ""
|
|
50
|
+ echo "turnserver not configured as other nginx sites use port 443"
|
|
51
|
+ echo ""
|
|
52
|
+ db_stop
|
|
53
|
+ exit 0
|
|
54
|
+ fi
|
|
55
|
+ done
|
|
56
|
+
|
39
|
57
|
# detect dpkg-reconfigure, just delete old links
|
40
|
58
|
db_get jitsi-meet-turnserver/jvb-hostname
|
41
|
59
|
JVB_HOSTNAME_OLD=$RET
|