Ghetto monitoring

I have a server with hardware problems so I wrote a quicky one line bash command to monitor it.

while /bin/true; do ping 1.2.3.4 -c1; if [ $? -ne 0 ] ; then echo "Server is down" | mutt -s Outage email@domain.com ; break; fi ; sleep 30 ; done;


Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 18.218.127.141
To prevent spam please submit by clicking the kitten: