标签:shell tomcat
#!/bin/bash
#by LC
#PROTNUM=`netstat -lntup|grep java |wc -l`
MAIL=lichuang@lichuang.com
TOMCAT_PROT (){
if [ `netstat -lntup|grep java |wc -l` -ne 9 ]
then
clear
echo -e "\033[31m############################################\033[0m"
echo -e "\033[31m#\033[0m""\033[1;5;31m TOMCAT PROT CANT FIND \033[0m""\033[31m #\033[0m"
echo -e "\033[31m############################################\033[0m"
echo "TOMCAT PROT CANT FIND"|mail -s tomcat $MAIL
#TOMCAT_PROT
else
sleep 120
TOMCAT_PROT
fi
}
main (){
TOMCAT_PROT
}
main本文出自 “10886311” 博客,请务必保留此出处http://10896311.blog.51cto.com/10886311/1721948
标签:shell tomcat
原文地址:http://10896311.blog.51cto.com/10886311/1721948