搜索

Nagios飞信linux短信报警脚本配置

发表于 2025-11-05 05:36:27 来源:益强智未来
Nagios飞信linux短信报警脚本配置
复制  vi sendsms.sh     #!/bin/bash   fetionDir=/usr/local/fetion/     cd $fetionDir   DIR=`pwd`   user=13724506486 pwd=gjb88888   for phone in `cat $DIR/phonelist.txt`     do     echo "$phone" | sed ‘/^[ \t]*$/d’ | sed ‘s/^[ \t]*//’ | sed ‘s/[ \t]*$//’ | grep ‘^1[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]‘     if (($?飞信 == 0 ));then     if [[ -f $DIR/msg.txt ]];then     echo "================" >> msg.txt     fi   phone=`echo "$phone" | sed ‘s/^[ \t]*//’ | sed ‘s/[ \t]*$//’`     echo "sms $phone $1" >> $DIR/msg.txt     echo "quit" >> $DIR/msg.txt     $fetionDir/fetion –mobile=$user –pwd=$pwd –to=$phone –msg-utf8="$1"   else     continue     fi     done   1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.
随机为您推荐
版权声明:本站资源均来自互联网,如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

Copyright © 2016 Powered by Nagios飞信linux短信报警脚本配置,益强智未来  滇ICP备2023006006号-17sitemap

回顶部