欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

檢測網(wǎng)站down掉后自動發(fā)信的shell腳本代碼

 更新時間:2013年02月25日 15:14:15   作者:  
腳本用途:檢測指定文件中的網(wǎng)站url,當(dāng)一個網(wǎng)站down掉后,自動給指定的郵箱發(fā)信
復(fù)制代碼 代碼如下:

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

相關(guān)文章

最新評論