if [ -d /home/apache-tomcat-7.0.21/webapps/trs ]; then
if [ -d /home/apache-tomcat-7.0.21/webapps/trs.backup ];then
rm -rf /home/apache-tomcat-7.0.21/webapps/trs.backup
fi
mv /home/apache-tomcat-7.0.21/webapps/trs /home/apache-tomcat-7.0.21/we bapps/trs.backup
fi
PID=`ps -ef | grep 'catalina' | grep -v 'grep' | awk '{print $2}'`
if [ -z $PID ]; then
echo "no catalina PID"
else
sh /home/apache-tomcat-7.0.21/bin/shutdown.sh
fi
rm -rf ./trs.war
echo "rm trs.war"
exit 0