检测tomcat关闭的shell
#!/bin/sh pid=`ps aux | grep tomcat | grep -v grep | grep -v retomcat | awk '{print $2}'` echo $pid if [ -n "$pid" ] then { echo ===========shutdown================ /etc/init.d/tomcat6 stop sleep 2 pid=`ps aux | grep tomcat | grep -v grep | grep -v retomcat | awk '{print $2}'` if [ -n "$pid" ] then { sleep 2 echo ========kill tomcat begin============== echo $pid kill -9 $pid echo ========kill tomcat end============== } fi sleep 2 echo ===========startup.sh============== /etc/init.d/tomcat6 restart } else echo ===========startup.sh============== /etc/init.d/
相关推荐
wandererdl 2020-06-14
rechanel 2020-11-16
taomengxing 2020-09-07
wintelx 2020-08-09
NBkiller 2020-06-14
CARBON 2020-06-11
xushxbigbear微信 2020-06-09
chenjinlong 2020-06-04
eroshn 2020-05-31
timegoes 2020-04-12
luvzhan 2020-04-12
kylinos 2020-03-07
季诗筱 2020-03-07
神龙 2020-05-11
jyj00 2020-05-04
LychieFan 2020-05-03
csdnyasin 2020-05-01
huguang 2020-04-22