Created
November 30, 2010 17:31
-
-
Save dave1010/722024 to your computer and use it in GitHub Desktop.
notify-apache-errors.sh
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 | |
# use ubuntu's notification system to let us know when there's something new in the apache error log | |
tail -n0 -f /var/log/apache2/error.log | while read line | |
do | |
body=`echo $line | cut -f 9- -d ' '` | |
notify-send -c im.received -i error "Apache / PHP error" "$body" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment