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
This commit is contained in:
Дамян Минков 2022-01-31 15:04:55 -06:00
parent b21beecbea
commit 5bcdd5173c
1 changed files with 9 additions and 0 deletions

View File

@ -204,6 +204,8 @@ case "$1" in
fi
fi
CERT_ADDED_TO_TRUST="false"
if [ ! -f /var/lib/prosody/$JICOFO_AUTH_DOMAIN.crt ]; then
# prosodyctl takes care for the permissions
# echo for using all default values
@ -220,6 +222,8 @@ case "$1" in
# store not get re-generated with latest changes
update-ca-certificates -f
CERT_ADDED_TO_TRUST="true"
# don't fail on systems with custom config ($PROSODY_HOST_CONFIG is missing)
if [ -f $PROSODY_HOST_CONFIG ]; then
# 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,6 +236,11 @@ case "$1" in
if [ "$PROSODY_CONFIG_PRESENT" = "false" ]; then
invoke-rc.d prosody restart || true
# In case we had updated the certificates and restarted prosody, let's restart and the bridge if possible
if [ -d /run/systemd/system ] && [ "$CERT_ADDED_TO_TRUST" = "true" ]; then
systemctl restart jitsi-videobridge2.service >/dev/null || true
fi
fi
;;