Skip to content
Snippets Groups Projects
Commit 50408559 authored by Bob Mottram's avatar Bob Mottram
Browse files

Ensure that if prosody gets stuck it will unstick itself at least once per day

parent 0f8615ab
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment