Skip to content

Instantly share code, notes, and snippets.

@dave1010
dave1010 / notify-apache-errors.sh
Created November 30, 2010 17:31
notify-apache-errors.sh
#!/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