shell脚本
#! /bin/bash SHUTDOWN="/root/tomcat/bin/shutdown.sh" STARTTOMCAT="/root/tomcat/bin/startup.sh" echo "关闭tomcat" $SHUTDOWN ps -ef |grep tomcat |grep /root/platform |grep -v ‘grep‘|awk ‘{print $2}‘ | xargs kill -9 sleep 10 echo "启动tomcat" $STARTTOMCAT
注:先使用tomcat本身的shutdown命令关闭,再用杀进程的方式补偿,做到真正关闭tomcat
欢迎光临娇娇家的美衣阁 http://shop105984718.taobao.com/
shell脚本中重启tomcat进程,布布扣,bubuko.com
原文:http://www.cnblogs.com/joewu/p/3928605.html