摘要:
内容如下: #!/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 阅读全文
摘要:
编写脚本内容 #!/bin/bashURL="http://127.0.0.1/"curlit(){curl --connect-timeout 15 --max-time 20 --head --silent "$URL" | grep '200'}doit(){if ! curlit; then 阅读全文