此脚本检测apache的启动情况,每分钟检测一次,服务停止后自动重启,并且发送邮件提示:[shell] #RESTART="/sbin/service httpd restart" RESTART="/sbin/service httpd start" PGREP="/usr/bin/pgrep" HTTPD="httpd" $PGREP ${HTTPD} if [ $? -ne 0 ] then #mail -s '...