Skip to content

Instantly share code, notes, and snippets.

@kng
Last active August 20, 2022 09:58
Show Gist options
  • Save kng/dfde51b33f1505d2f828c8a25240fb7b to your computer and use it in GitHub Desktop.
Save kng/dfde51b33f1505d2f828c8a25240fb7b to your computer and use it in GitHub Desktop.
satnogs client check for error and restart service
#!/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
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