Browse Source

Removes debug log and adds safety check whether config exists.

master
damencho 6 years ago
parent
commit
69a12395d2
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      debian/jitsi-meet-prosody.postinst

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

@@ -126,16 +126,16 @@ 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
-        echo "PR11_INSTALL_CHECK is $PR11_INSTALL_CHECK"
130 129
         PR_VER_INSTALLED=$(dpkg-query -f='${Version}\n' --show prosody  2>/dev/null || true)
131
-        echo "PR_VER_INSTALLED is $PR_VER_INSTALLED"
132 130
         if [ "$PR11_INSTALL_CHECK" = "installed" ] \
133 131
             || [ "$PR11_INSTALL_CHECK" = "unpacked" ] \
134 132
             || dpkg --compare-versions "$PR_VER_INSTALLED" gt "0.11" ; then
135
-            sed -i 's/storage = \"null\"/storage = \"memory\"/g' $PROSODY_HOST_CONFIG
133
+            if [ -f $PROSODY_HOST_CONFIG ]; then
134
+                sed -i 's/storage = \"null\"/storage = \"memory\"/g' $PROSODY_HOST_CONFIG
136 135
 
137
-            # trigger a restart
138
-            PROSODY_CONFIG_PRESENT="false"
136
+                # trigger a restart
137
+                PROSODY_CONFIG_PRESENT="false"
138
+            fi
139 139
         fi
140 140
 
141 141
         if [ ! -f /var/lib/prosody/$JICOFO_AUTH_DOMAIN.crt ]; then

Loading…
Cancel
Save