检测网站是否正常

#!/bin/sh

URL=” http://bbs.example.cn”
RETURN=`curl -o /dev/null -s -w “%{http_code}” “${URL}”`
if [ $RETURN != '200' ];then
#重启服务命令
./restart
fi

猜你喜欢

转载自voyageivi.iteye.com/blog/1677995