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"

创新互联建站坚持“要么做到,要么别承诺”的工作理念,服务领域包括:成都网站制作、网站建设、企业官网、英文网站、手机端网站、网站推广等服务,满足客户于互联网时代的江油网站设计、移动媒体设计的需求,帮助企业找到有效的互联网解决方案。努力成为您成熟可靠的网络建设合作伙伴!

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

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。

本文名称:phpmailmonitor.sh-创新互联
当前链接:https://www.cdcxhl.com/article40/csjeho.html

成都网站建设公司_创新互联,为您提供微信公众号网站收录网站设计外贸网站建设域名注册商城网站

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

绵阳服务器托管