Created
November 2, 2016 16:09
-
-
Save alanreynosov/3e0d07d4be64c1c2147749fa046722c0 to your computer and use it in GitHub Desktop.
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
sudo tail -fn0 /var/log/httpd/error_log | \ | |
while read line ; do | |
echo "$line" | grep "[error]" | |
if [ $? = 0 ] | |
then | |
echo "Error from Apptest Regalli : $line" | mail -s "Error message email" help@regalii.com | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment