tomcat restart script

tomcat_path=/opt/soft/tomcat-womencun
 
 
javacount=`ps -ef | grep $tomcat_path| grep -v "grep"  | wc -l`
 
if [ $javacount -ge 1 ]; then
  ps -ef | grep $tomcat_path| grep -v "grep"  | awk {'print $2'} | xargs kill -9
be
 
echo "service stop success"
echo "and now start service ...."
 
sleep 3
 
rm -fr $tomcat_path/work
#If tomcat sets CATALINA_PID, you also need to delete the pid file in this step
 
$tomcat_path/bin/startup.sh & tail -f $tomcat_path/logs/catalina.out

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326858814&siteId=291194637