服务监听重启脚本
#!/bin/sh
. ~/.bash_profile
RES_9082=`curl http://127.0.0.1:9082/ifaceHN4O/services/operation?wsdl | wc -l`
RES_9083=`curl http://127.0.0.1:9083/ifaceHN4O/services/operation?wsdl | wc -l`
if [ ${RES_9082} -lt 10 ]; then
ps -ef | grep java | grep "/data/iface/tomcat " | awk '{print "kill -9 " $2}' | sh
/bin/sh /data/iface/tomcat/bin/startup.sh
fi
if [ ${RES_9083} -lt 10 ]; then
ps -ef | grep java | grep "/data/iface/tomcat-9083 " | awk '{print "kill -9 " $2}' | sh
/bin/sh /data/iface/tomcat-9083/bin/startup.sh
fi
. ~/.bash_profile
RES_9082=`curl http://127.0.0.1:9082/ifaceHN4O/services/operation?wsdl | wc -l`
RES_9083=`curl http://127.0.0.1:9083/ifaceHN4O/services/operation?wsdl | wc -l`
if [ ${RES_9082} -lt 10 ]; then
ps -ef | grep java | grep "/data/iface/tomcat " | awk '{print "kill -9 " $2}' | sh
/bin/sh /data/iface/tomcat/bin/startup.sh
fi
if [ ${RES_9083} -lt 10 ]; then
ps -ef | grep java | grep "/data/iface/tomcat-9083 " | awk '{print "kill -9 " $2}' | sh
/bin/sh /data/iface/tomcat-9083/bin/startup.sh
fi
浙公网安备 33010602011771号