#!/bin/bash
#purpose: fm tomcat startup or shutdown shell
#date:2015-02-04
#author:lirongqiang
#example sh fmtomcat.sh start redtop1 # to start redtop1
echo "example1: sh fmtomcat.sh start redtop1 "
echo "example1 is to start tomcat-red-top-app1"
echo "example2: sh fmtomcat.sh shutdown redtop1"
echo "example2 is to shutdown tomcat-red-top-app1"
cd /root/app
if [ $2 = "redtop1" ];then
./shutdown.sh
echo "must be start or shutdown "
elif [ $2 = "redtop2" ];then
./startup.sh;
./shutdown.sh
echo "must be start or shutdown "
elif [ $2 = "fmb" ];then
cd tomcat-fm-business-app1/bin;
if [ $1 = "start" ];then
./startup.sh;
elif [ $1 = "shutdown" ];then
./shutdown.sh;
else
echo "must be start or shutdown "
fi
else
echo "must be fmb redtop1 redtop2 "
fi
<script type="text/javascript" id="wumiiRelatedItems"> </script>