Browse Source

Does not override prosody config on update.

j8
Damian Minkov 10 years ago
parent
commit
9d98b3a29e
2 changed files with 16 additions and 8 deletions
  1. 13
    5
      debian/jitsi-meet-prosody.postinst
  2. 3
    3
      debian/jitsi-meet.postinst

+ 13
- 5
debian/jitsi-meet-prosody.postinst View File

@@ -23,12 +23,20 @@ case "$1" in
23 23
 
24 24
         . /etc/default/jitsi-videobridge
25 25
 
26
-        if [ -f /etc/prosody/prosody.cfg.lua ]; then
27
-            mv /etc/prosody/prosody.cfg.lua /etc/prosody/prosody.cfg.lua.orig
26
+        PROSODY_CONFIG_PRESENT="true"
27
+        if [ ! -f /etc/prosody/prosody.cfg.lua ]; then
28
+            PROSODY_CONFIG_PRESENT="false"
29
+            gunzip -c /usr/share/doc/jitsi-meet-prosody/prosody.cfg.lua-jvb.example.gz > /etc/prosody/prosody.cfg.lua
28 30
         fi
29
-        gunzip -c /usr/share/doc/jitsi-meet-prosody/prosody.cfg.lua-jvb.example.gz > /etc/prosody/prosody.cfg.lua
30
-        sed -i "s/jitmeet.example.com/$JVB_HOSTNAME/g" /etc/prosody/prosody.cfg.lua
31
-        sed -i "s/jitmeetSecret/$JVB_SECRET/g" /etc/prosody/prosody.cfg.lua
31
+
32
+        if [ ! grep "VirtualHost \"$JVB_HOSTNAME\"" /etc/prosody/prosody.cfg.lua > /dev/null ]; then
33
+            if [ "PROSODY_CONFIG_PRESENT" = "true" ]; then
34
+                mv /etc/prosody/prosody.cfg.lua /etc/prosody/prosody.cfg.lua.orig
35
+            fi
36
+            sed -i "s/jitmeet.example.com/$JVB_HOSTNAME/g" /etc/prosody/prosody.cfg.lua
37
+            sed -i "s/jitmeetSecret/$JVB_SECRET/g" /etc/prosody/prosody.cfg.lua
38
+        fi
39
+
32 40
         if [ ! -f /var/lib/prosody/$JVB_HOSTNAME.crt ]; then
33 41
             HOST="$( (hostname -s; echo localhost) | head -n 1)"
34 42
             DOMAIN="$( (hostname -d; echo localdomain) | head -n 1)"

+ 3
- 3
debian/jitsi-meet.postinst View File

@@ -39,9 +39,9 @@ case "$1" in
39 39
         chown -R www-data:www-data /usr/share/jitsi-meet/
40 40
         sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" /usr/share/jitsi-meet/config.js
41 41
         # enable turn
42
-        if grep "//  useStunTurn: true," /usr/share/jitsi-meet/config.js > /dev/null; then
43
-            sed -i "s/\/\/\ \ useStunTurn:\ true,/\ \ \ \ useStunTurn:\ true,/" /usr/share/jitsi-meet/config.js
44
-        fi
42
+        #if grep "//  useStunTurn: true," /usr/share/jitsi-meet/config.js > /dev/null; then
43
+        #    sed -i "s/\/\/\ \ useStunTurn:\ true,/\ \ \ \ useStunTurn:\ true,/" /usr/share/jitsi-meet/config.js
44
+        #fi
45 45
         invoke-rc.d nginx restart
46 46
 
47 47
     ;;

Loading…
Cancel
Save