Browse Source

Updates config if prosody 0.10 is used.

master
damencho 5 years ago
parent
commit
4f6a0d7d3a
1 changed files with 14 additions and 0 deletions
  1. 14
    0
      debian/jitsi-meet-prosody.postinst

+ 14
- 0
debian/jitsi-meet-prosody.postinst View File

@@ -126,6 +126,7 @@ case "$1" in
126 126
         fi
127 127
 
128 128
         PR11_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'prosody-0.11' 2>/dev/null | awk '{print $3}' || true)"
129
+        PR10_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'prosody-0.10' 2>/dev/null | awk '{print $3}' || true)"
129 130
         PR_VER_INSTALLED=$(dpkg-query -f='${Version}\n' --show prosody  2>/dev/null || true)
130 131
         if [ "$PR11_INSTALL_CHECK" = "installed" ] \
131 132
             || [ "$PR11_INSTALL_CHECK" = "unpacked" ] \
@@ -137,6 +138,19 @@ case "$1" in
137 138
                 PROSODY_CONFIG_PRESENT="false"
138 139
             fi
139 140
         fi
141
+        if [ "$PR10_INSTALL_CHECK" = "installed" ] \
142
+            || [ "$PR10_INSTALL_CHECK" = "unpacked" ] \
143
+            || dpkg --compare-versions "$PR_VER_INSTALLED" gt "0.10" ; then
144
+
145
+            # if the version is 0.10.X (>0.10 and <0.11)
146
+            if [ -f $PROSODY_HOST_CONFIG ] \
147
+                && dpkg --compare-versions "$PR_VER_INSTALLED" lt "0.11" ; then
148
+                sed -i 's/storage = \"null\"/storage = \"none\"/g' $PROSODY_HOST_CONFIG
149
+
150
+                # trigger a restart
151
+                PROSODY_CONFIG_PRESENT="false"
152
+            fi
153
+        fi
140 154
 
141 155
         if [ ! -f /var/lib/prosody/$JICOFO_AUTH_DOMAIN.crt ]; then
142 156
             # prosodyctl takes care for the permissions

Loading…
Cancel
Save