如果收不到邮件,那么qq邮箱设置|邮箱设置|反垃圾|白名单|设置邮件地址白名单|root@pve.local
root@pve:~# cat mail.sh
#!/bin/bash
nport=`echo ""|telnet 192.168.2.143 6379 2>/dev/null|grep "\^]"|wc -l`
if [ "$nport" -eq "0" ];then
echo "no";
#echo "redis not start" |mail -s "error" root
else
echo "ok";
fi
##!/bin/bash
#a=`lsof -i:6379 | wc -l`
#if [ "$a" -gt "0" ];then
# echo "ok"
#else
# echo "no"
# echo "redis not start" |mail -s "error" root
#fi