httpd停止后 ,还是输出http is ok
#!/bin/bash status=$(ps aux | grep httpd | grep -v grep) if [ -n "$status" ] then echo "$(date) http is ok" else echo "$(date) http is down" /etc/rc.d/init.d/httpd start fi
#!/bin/bash status=$(ps aux | grep httpd | grep -v grep) if [ -n "$status" ] then echo "$(date) http is ok" else echo "$(date) http is down" /etc/rc.d/init.d/httpd start fi
2017-11-30
举报