Created
November 3, 2011 15:17
-
-
Save stesh/1336748 to your computer and use it in GitHub Desktop.
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
| ( [ -f /var/run/lighttpd.pid ] && [ $(pgrep lighttpd | head -n 1) = $(head -n 1 /var/run/lighttpd.pid) ] ) || ( | |
| /etc/init.d/lighttpd restart | |
| echo \ | |
| "To: webmaster@netsoc.tcd.ie | |
| From: root@cubewww.netsoc.tcd.ie | |
| Subject: Automated restart of lighttpd | |
| Attempted automated restart of lighttpd on $(date) | |
| " | sendmail "webmaster@netsoc.tcd.ie" | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment