寻觅生命中的那一片浅草......

每日存档 四月 9th, 2010

用curl检测URL返回状态

#!/bin/bash
#自动检测论坛php是否挂了

while true
do
URL=” http://bbs.example.cn”
RETURN=`curl -o /dev/null -s -w “%{http_code}” “${URL}”`
if [ $RETURN != ‘200’ ];then
/data/sh/fastcgi_restart
fi
sleep 12
done

2010年四月
« 3月   5月 »
 1234
567891011
12131415161718
19202122232425
2627282930