监控web脚本三

[root@db01-51 scripts]# cat check_web.sh 
#/bin/bash
if [ "`curl -I www.baidu.com &>/dev/null && echo $?`" = "0" ]
  then 
    echo "httpd is running"
  else 
    echo "httpd is stoppd"
fi

  

posted @ 2017-03-11 11:43  reborn枪  阅读(63)  评论(0)    收藏  举报