Shell脚本检测URL可用性
2014-05-09 14:32
323 查看
#!/bin/bash
#自动检测URL是否挂了
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
#自动检测URL是否挂了
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
相关文章推荐
- 案例:Shell脚本检测网站url是否正常运行
- WyBox使用shell脚本检测io口是否正常
- 在perl中,检测shell脚本返回值
- 批量检测Mysql复制状态的shell 脚本
- 检测网站down掉后自动发信的shell脚本代码
- [shell]通过ping检测整个网段IP的网络状态脚本
- Python实现的Google IP 可用性检测脚本
- shell检测interface是否已分配ip,qt调用shell脚本
- 企业Shell面试题14:开发脚本入侵检测与报警案例
- php脚本检测haproxy后端的可用性
- 【shell脚本】检测局域网内存活主机
- shell脚本实现实时检测文件变更
- 检测mysql表的shell脚本
- 自动检测shell语法脚本
- shell脚本检测某一网段
- linux下如何自动检测并重新启动一个死掉的进程(shell脚本实现)
- 企业内部网段检测有多少主机存活——shell脚本
- 检测网段IP使用情况的shell脚本
- shell 脚本 检测文件夹
- 检测tomcat运行状态,自动重启TOMCAT脚本SHELL