# edit: www.jbxue.com
#
SLEEPTIME=30
while true
do
id=`ps aux | grep httpd | grep -v "grep" | wc -l`
if [ $id -lt 1 ]; then
echo "---`date +"%F %H:%M:%S"`-----httpd restart." >> /u/scripts/httpd_monitor.log
/etc/init.d/httpd start
fi
sleep $SLEEPTIME
done


