# tomcat进程无法shutdown,会在后台开启多个进程实例
if ps -ef|grep tomcat8|grep -v grep >/dev/null 2>&1
then
echo "tomcat is running ,tomcat will be redeploy in a minutes,please wait for a moment "
ps -ef|grep tomcat8|grep -v grep|awk '{print $2}'|xargs kill -9
# ./shutdown.sh
cd /data/tomcat8/bin
sleep 30s
./startup.sh
echo "tomcat started by shell"
else
cd /data/tomcat8/bin
./startup.sh
echo "tomcat started by shell"
fi
if ps -ef|grep tomcat8|grep -v grep >/dev/null 2>&1
then
echo "tomcat is running ,tomcat will be redeploy in a minutes,please wait for a moment "
ps -ef|grep tomcat8|grep -v grep|awk '{print $2}'|xargs kill -9
# ./shutdown.sh
cd /data/tomcat8/bin
sleep 30s
./startup.sh
echo "tomcat started by shell"
else
cd /data/tomcat8/bin
./startup.sh
echo "tomcat started by shell"
fi