郵箱:[email protected]
微博:
博客:https://blog.csdn.net/bulletoo_(轉載請說明出處)
---------------------------------------------------華麗的分割線----------------------------------------------------------------
#!/bin/sh
. /etc/profile
pid=`ps aux | grep official_tomcat | grep -v grep | grep -v retomcat | awk '{print $2}'`
echo $pid
if [ -n "$pid" ]
then
{
echo ===========shutdown================
/zfcx/tomcat/official_tomcat/bin/shutdown.sh
sleep 1
pid=`ps aux | grep official_tomcat | grep -v grep | grep -v retomcat | awk '{print $2}'`
if [ -n "$pid" ]
then
{
sleep 1
echo ========kill tomcat==============
kill -9 $pid
}
fi
sleep 1
echo ===========startup.sh==============
/zfcx/tomcat/official_tomcat/bin/startup.sh
}
else
echo ===========startup.sh==============
/zfcx/tomcat/official_tomcat/bin/startup.sh
fi