Ensure that if prosody gets stuck it will unstick itself at least once per day
This commit is contained in:
parent
0f8615abe1
commit
50408559bd
|
@ -544,6 +544,7 @@ function remove_xmpp {
|
|||
remove_onion_service xmpp 5222 5223 5269
|
||||
|
||||
apt-get -yq remove --purge prosody
|
||||
rm /etc/cron.daily/prosody
|
||||
if [ -f $INSTALL_DIR/$prosody_modules_filename ]; then
|
||||
rm $INSTALL_DIR/$prosody_modules_filename
|
||||
fi
|
||||
|
@ -1059,6 +1060,13 @@ 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
|
||||
|
||||
${PROJECT_NAME}-pass -u $MY_USERNAME -a xmpp -p "$XMPP_PASSWORD"
|
||||
|
||||
APP_INSTALLED=1
|
||||
|
|
Loading…
Reference in New Issue