linux-2 下tomcat重启定向输出日志

#!/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
上一篇:Ajax提交Form表单及文件上传


下一篇:使用ajax提交form表单,包括ajax文件上传