#!/bin/sh pid=`ps aux | grep tomcat | grep -v grep | awk '{print $2}'`
echo $pid if [ -n "$pid" ]
then
{
echo ===========shutdown================
/app/apache-tomcat-6.0./bin/shutdown.sh
# tail -f /app1/ForceView/fvsd_nm/apache-tomcat-6.0./logs/catalina.out
sleep
pid=`ps aux | grep tomcat | grep -v grep | grep -v retomcat | awk '{print $2}'`
if [ -n "$pid" ]
then
{
sleep
echo ========kill tomcat==============
kill - $pid
}
fi echo ===========startup.sh==============
sleep
/app/apache-tomcat-6.0./bin/startup.sh
tail -f /app/apache-tomcat-6.0./logs/catalina.out
}
else echo ===========startup.sh==============
nohup ./app/apache-tomcat-6.0./bin/startup.sh &
tail -f /app/apache-tomcat-6.0./logs/catalina.out
fi