溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

phpmailmonitor.sh

發(fā)布時間:2020-07-12 22:19:17 來源:網(wǎng)絡(luò) 閱讀:490 作者:莎吧啦 欄目:web開發(fā)

[root@webmonitor shell]# cat phpmailmonitor.sh 
#!/bin/sh
# FileName:    phpmailmonitor.sh
# Date:        2010-11-02
# Author:      chenhc
# Description: curl number and compare 
# Version 1.0
# ep:./phpmailmonitor.sh
#####
contactphone="1345558021,12220550726"
code=`curl 'http://trader.gate.com/tools/pd/263smtpcheck/monitor.php'`
waiting=`echo $code|awk -F '1,' '{print $2}'|awk '{print $1}'`
sending=`echo $code|awk -F '2,' '{print $2}'|awk '{print $1}'`
fail=`echo $code|awk -F '4,' '{print $2}'|awk '{print $1}'`
lastfail=`cat /tmp/lastfail`
echo "waiting=$waiting"
echo "sending=$sending"
echo "fail=$fail"

check_null()
{
if [ -z "$1" ];then
 wget  --output-document=/dev/null  "http://124.4.15.208/message.php?phone=$contactphone&msg=Lv.2 phpmailmonitor.sh exception`date +%k:%M`"
exit 1;
fi
}
check_null $code 
check_null $waiting 
check_null $fail 

#if [ $waiting -gt 2000 ];then
#       wget  --output-document=/dev/null  "http://124.4.15.208/message.php?phone=$contactphone&msg=Lv.2 $waiting mail is waiting sms from 200.6 phpmailmonitor.sh`date +%k:%M`"
#fi
echo "${lastfail}"
increasment=$((${fail}-${lastfail}))
echo $fail>/tmp/lastfail
if [ $increasment -gt 500 ];then
        wget  --output-document=/dev/null  "http://124.4.15.208/message.php?phone=$contactphone&msg=Lv.2 $increasment mail fail sms from 200.6 phpmailmonitor.sh`date +%k:%M`"
fi

 

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI