#!/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