Add prosody daemon restart on upgrades
This commit is contained in:
parent
50408559bd
commit
7aedc27b12
|
@ -375,6 +375,17 @@ function update_prosody_modules {
|
|||
fi
|
||||
}
|
||||
|
||||
function prosody_daemon_restart_script {
|
||||
# On rare occasions the daemon appears to get stuck
|
||||
# i.e. still active, but not accepting connections
|
||||
# This ensures that it will unstick itself at least once per day
|
||||
if [ ! -f /etc/cron.daily/prosody ]; then
|
||||
echo '#!/bin/bash' > /etc/cron.daily/prosody
|
||||
echo 'systemctl restart prosody' >> /etc/cron.daily/prosody
|
||||
chmod +x /etc/cron.daily/prosody
|
||||
fi
|
||||
}
|
||||
|
||||
function upgrade_xmpp {
|
||||
if [ -d /etc/letsencrypt ]; then
|
||||
prosody_groups=$(groups prosody)
|
||||
|
@ -382,6 +393,7 @@ function upgrade_xmpp {
|
|||
usermod -a -G ssl-cert prosody
|
||||
fi
|
||||
fi
|
||||
prosody_daemon_restart_script
|
||||
function_check update_prosody_modules
|
||||
update_prosody_modules
|
||||
xmpp_onion_addresses /etc/prosody/prosody.cfg.lua
|
||||
|
@ -1060,12 +1072,7 @@ function install_xmpp {
|
|||
exit 347682
|
||||
fi
|
||||
|
||||
# On rare occasions the daemon appears to get stuck
|
||||
# i.e. still active, but not accepting connections
|
||||
# This ensures that it will unstick itself at least once per day
|
||||
echo '#!/bin/bash' > /etc/cron.daily/prosody
|
||||
echo 'systemctl restart prosody' >> /etc/cron.daily/prosody
|
||||
chmod +x /etc/cron.daily/prosody
|
||||
prosody_daemon_restart_script
|
||||
|
||||
${PROJECT_NAME}-pass -u $MY_USERNAME -a xmpp -p "$XMPP_PASSWORD"
|
||||
|
||||
|
|
Loading…
Reference in New Issue