日期:2014-05-16 浏览次数:20636 次
weboff文件内容:
cd /apps/tomcat-6.0.29/bin
./shutdown.sh
sleep 4
/killtomcat.sh
sleep 1
/sbin/service sshd start
cd
?
webon文件内容:
service sshd stop
sleep 4
cd /apps/tomcat-6.0.29/bin/
./startup.sh
cd
killtomcat.sh文件内容:
#!/bin/sh
#kill tomcat pid
pidlist=`ps -ef|grep tomcat | grep -v "grep"|awk '{print $2}'`
#ps -u $USER|grep "java"|grep -v "grep"
echo "tomcat Id list :$pidlist"
if [ "$pidlist" = "" ]
then
? echo "no tomcat pid alive"
else
? for pid in ${pidlist}
?{
?? kill -9 $pid
?echo "KILL $pid:"
?echo "service stop success"
? }
fi
?
?