Last active
August 20, 2022 09:58
-
-
Save kng/dfde51b33f1505d2f828c8a25240fb7b to your computer and use it in GitHub Desktop.
satnogs client check for error and restart service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$(journalctl -u satnogs-client.service -n 200|grep -c 'Observer job lock acquiring timed out')" -gt 0 ]; then | |
# dump the log for later inspection | |
journalctl -u satnogs-client.service -n 200 > ~/satnogs-client.log | |
sudo service satnogs-client restart | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 */1 * * * /home/pi/check_satnogsclient.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment