资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

phpmailmonitor.sh

[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"

专注于为中小企业提供网站设计制作、成都网站设计服务,电脑端+手机端+微信端的三站合一,更高效的管理,为中小企业溧水免费做网站提供优质的服务。我们立足成都,凝聚了一批互联网行业人才,有力地推动了1000+企业的稳健成长,帮助中小企业通过网站建设实现规模扩充和转变。

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

 


文章题目:phpmailmonitor.sh
本文地址:http://cdkjz.cn/article/pcejso.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220