RunWebserver.sh

#!/bin/sh
icount=`pgrep -fl jakarta-tomcat.bin | wc -l`

if [ $icount = 0 ]
then
   echo "Newly starting the Tomcat, pls waiting..."
   sh /jakarta-tomcat/bin/startup.sh
   echo "Removing the old compiled class files"
   exit -1;
fi

if [ $icount != 0 ]
then
   echo "Restarting the Tomcat, pls waiting..."
   sh /jakarta-tomcat/bin/shutdown.sh
   echo "Cleaning the old compiled classes"
   sh /jakarta-tomcat/bin/startup.sh
   exit -1;
fi

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章