摘要:
内容如下: #!/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 h 阅读全文
posted @ 2018-03-29 15:27
菜鸟起飞中
阅读(116)
评论(0)
推荐(0)
摘要:
编写脚本内容 #!/bin/bashURL="http://127.0.0.1/"curlit(){curl --connect-timeout 15 --max-time 20 --head --silent "$URL" | grep '200'}doit(){if ! curlit; then 阅读全文
posted @ 2018-03-29 15:20
菜鸟起飞中
阅读(173)
评论(0)
推荐(0)
浙公网安备 33010602011771号