Tomcat停止与启动shell
程序员文章站
2022-07-12 23:51:03
...
#!/bin/sh export JAVA_HOME=/usr/java/jdk1.6.0_20/ pid=`ps -ef|grep tomcat|grep -v grep|awk '{print $2}'` echo "kill tomcat pid "$pid kill -9 $pid sleep 3 echo "==========start tomcat============" '/usr/local/tomcat/bin/startup.sh' sleep 3 /usr/local/apache/bin/apachectl restart echo "=========Apache Restart OK ==========="