手机
当前位置:查字典教程网 >脚本专栏 >linuxshell >检测网站down掉后自动发信的shell脚本代码
检测网站down掉后自动发信的shell脚本代码
摘要:复制代码代码如下:#!/bin/bash#websitetestscriptswhiletrue;doforcycle_tempin`cat...

复制代码 代码如下:

#!/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

【检测网站down掉后自动发信的shell脚本代码】相关文章:

linux 监视端口是否正常的shell脚本

用expect实现的自动登录到多台服务器的shell脚本

Linux shell脚本全面学习入门

消耗CPU资源的shell脚本

使用iconv批量改变文件编码的shell脚本

简单的Linux查找后门思路和shell脚本分享

监控服务器swap并重启php的Shell脚本

监控php-fpm并自动重启服务的shell脚本

shell遍历目录处理特定目录的脚本代码

用来记录登录后使用命令的shell脚本

精品推荐
分类导航