check_80.sh

[datacenter@newftp ftpsite]$ cat check_80.sh
#!/bin/bash
function check_url() {
D=$(date +%H%M%S)
curl --connect-timeout 10 -m 20 "127.0.0.1:80" > /dev/null
r_curl=$(echo $?)
}

check_url
if [ $r_curl == 0 ];then
    echo "$D nginx Normal"
else
    echo "$D nginx fail"
fi

exit 0

posted @ 2015-04-24 16:39  金葵学子  阅读(86)  评论(0编辑  收藏  举报