您现在的位置是:网站首页> 编程资料编程资料
检测网站down掉后自动发信的shell脚本代码_linux shell_
2023-05-26
475人已围观
简介 检测网站down掉后自动发信的shell脚本代码_linux shell_
复制代码 代码如下:
#!/bin/bash
#website test scripts
while true;do
for cycle_temp in `cat url_list`
do
if lynx -dump `echo ${cycle_temp}` -accept_all_cookies|grep "true";then
echo "The website is running naturally"
else
echo "${cycle_temp} has been offline please attend it now!">/opt/test.txt
mail -v -s "website down mail" reterry123@163.com < /opt/test.txt
fi
done
sleep 2s
done
相关内容
- shell脚本从SVN推送到多台服务器的代码_linux shell_
- 用expect实现的自动登录到多台服务器的shell脚本_linux shell_
- linux shell 中 2>&1的含义_linux shell_
- linux bash字符串处理大全_linux shell_
- 防止ARP攻击的shell代码_linux shell_
- ubuntu与centos中更换ip的shell代码_linux shell_
- awk中查看包含某两列字符的用法_linux shell_
- 利用kernel提供的接口打印进程号(pid)_linux shell_
- linux shell进度条实现方法_linux shell_
- linux使用select实现精确定时器详解_linux shell_
