Browse Source

fix: Restarts jvb after prosody on initial install.

Fixes an issue where on clean install we see:
WARNING: [25] [hostname=localhost id=shard] MucClient.lambda$getConnectAndLoginCallable$7#622: [MucClient id=shard hostname=localhost] error connecting
org.jivesoftware.smack.SmackException$SmackWrappedException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
master
Дамян Минков 3 years ago
parent
commit
5bcdd5173c
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      debian/jitsi-meet-prosody.postinst

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

204
             fi
204
             fi
205
         fi
205
         fi
206
 
206
 
207
+        CERT_ADDED_TO_TRUST="false"
208
+
207
         if [ ! -f /var/lib/prosody/$JICOFO_AUTH_DOMAIN.crt ]; then
209
         if [ ! -f /var/lib/prosody/$JICOFO_AUTH_DOMAIN.crt ]; then
208
             # prosodyctl takes care for the permissions
210
             # prosodyctl takes care for the permissions
209
             # echo for using all default values
211
             # echo for using all default values
220
             # store not get re-generated with latest changes
222
             # store not get re-generated with latest changes
221
             update-ca-certificates -f
223
             update-ca-certificates -f
222
 
224
 
225
+            CERT_ADDED_TO_TRUST="true"
226
+
223
             # don't fail on systems with custom config ($PROSODY_HOST_CONFIG is missing)
227
             # don't fail on systems with custom config ($PROSODY_HOST_CONFIG is missing)
224
             if [ -f $PROSODY_HOST_CONFIG ]; then
228
             if [ -f $PROSODY_HOST_CONFIG ]; then
225
                 # now let's add the ssl cert for the auth. domain (we use # as a sed delimiter cause filepaths are confused with default / delimiter)
229
                 # now let's add the ssl cert for the auth. domain (we use # as a sed delimiter cause filepaths are confused with default / delimiter)
232
 
236
 
233
         if [ "$PROSODY_CONFIG_PRESENT" = "false" ]; then
237
         if [ "$PROSODY_CONFIG_PRESENT" = "false" ]; then
234
             invoke-rc.d prosody restart || true
238
             invoke-rc.d prosody restart || true
239
+
240
+            # In case we had updated the certificates and restarted prosody, let's restart and the bridge if possible
241
+            if [ -d /run/systemd/system ] && [ "$CERT_ADDED_TO_TRUST" = "true" ]; then
242
+                systemctl restart jitsi-videobridge2.service >/dev/null || true
243
+            fi
235
         fi
244
         fi
236
     ;;
245
     ;;
237
 
246
 

Loading…
Cancel
Save