shutdown-force.sh解決tomcat沒法正常關閉須要手動kill問題。 java
在tomcat/bin下建立shutdown-force.shtomcat
set fileformat=unix #!/bin/bash #force shutdown tomcat,copy this sh file to tomcat/bin dir path=$(dirname $0) echo "exec $path/shutdown.sh" $path/shutdown.sh sleep 3s #kill -9 pid echo "Kill tomcat! pid:" `ps -ef|grep $path|grep java|awk '{print $2}'` ps -ef|grep $path|grep java|awk '{print $2}'|xargs kill -9 #success msg echo "shutdown success" ps -ef|grep $path|grep java|awk '{print $2}'