July 2014
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

July 2014
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

check httpd runing or not

#!/bin/sh SERVICE=’httpd’

if ps ax | grep -v grep | grep $SERVICE > /dev/null then echo “$SERVICE service running, everything is fine” else echo “$SERVICE is not running” echo “$SERVICE is not running!” | mail -s “$SERVICE down” root fi