linux下重启tomcat sh

展翅飞嵌入式之路 2012-12-03

#!/bin/sh

pid=`/sbin/pidofjava`

echo"/sbin/pidofjava"$pid

sleep2

if[-n"$pid"];

then

{

echo"==========tomcatisstart,nowkill$pid============"

kill-9$pid

echo"==kill-9$pid==="

sleep1

exportJAVA_HOME=/usr/java/jdk1.6.0_19

exportCATALINA_HOME=/usr/local/tomcat

cd/usr/local/tomcat/bin

'./startup.sh'

}

else

{

echo"==========tomcatisstop=====start======="

exportJAVA_HOME=/usr/java/jdk1.6.0_19

exportCATALINA_HOME=/usr/local/tomcat

cd/usr/local/tomcat/bin

'./startup.sh'

}

fi

sleep25

echo"dbstar"

相关推荐

HappinessCat / 0评论 2020-06-16
Linuxer / 0评论 2016-08-10