预防定时重启apache服务没有起来的脚本
内容如下:
#!/bin/bash
test=$(ps aux | grep httpd | grep -v grep)
if [ -n "$test" ]
then
echo "httpd is ok"
else
echo "httpd is not ok"
systemctl restart httpd
fi
仅在centos 7里面测试通过