Skip to content

Instantly share code, notes, and snippets.

@mrchrisadams
Created March 15, 2009 19:32
Show Gist options
  • Save mrchrisadams/79515 to your computer and use it in GitHub Desktop.
Save mrchrisadams/79515 to your computer and use it in GitHub Desktop.
#!/bin/sh
# check if the doord.pid is in the /var/run folder, showing that doord is running okay
cat /var/run/doord.pid
echo " "
# if cat shows up okay, then say we're cool, otherwise start doord again
if [ $? = 0 ] ; then
echo "We're good."
else
echo "Looks like Doord's gone down again. Rebooting..."
/etc/init.d/doord start
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment