Created
May 16, 2011 21:56
-
-
Save kd7lxl/975460 to your computer and use it in GitHub Desktop.
Cron Watchdog
This file contains hidden or 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/sh | |
if ps ax | grep pywxtd | grep -v grep > /dev/null | |
then | |
echo "service is running" > /dev/null | |
else | |
echo `date`: starting pywxtd after crash >> /var/log/pywxtd.log | |
/etc/init.d/pywxtd start | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment