#打包运用名称(war包名称)

_application_name="customs-channel-web"

#tomcat名字

_tomcat_name="tomcat-customs-channel-web"

hostname

ps -ef |grep /usr/local/baofoo4/$_tomcat_name/ |grep -v grep|cut -c 10-15|xargs kill -9

cd /usr/local/baofoo4/$_tomcat_name/webapps

pwd

rm -rf ROOT ROOT.war.BAK 

mv -f ROOT.war ROOT.war.BAK 

mv -f /data/app/$_application_name.war  /usr/local/baofoo4/$_tomcat_name/webapps/ROOT.war

sleep 1

export JAVA_HOME=/usr/local/jdk1.8.0_92

export PATH=$JAVA_HOME/bin:$PATH

java -version

sh   /usr/local/baofoo4/$_tomcat_name/bin/startup.sh restart

sleep 1

exit 0