tomcat 自动发布

#!/bin/bash

tomcat=/usr/local/tomcat/apache-tomcat-9.0

tomcat_pid=`lsof -n -P -t -i :8090`

kill -9 $tomcat_pid

bakdate=`date +%Y%m%d`

cp $tomcat/webapps/tos-server.war /data/upload/bak/tos$bakdate.war

rm -rf $tomcat/webapps/tos-server.war

rm -rf $tomcat/webapps/tos-server

cp tos-server.war $tomcat/webapps/tos-server.war

cd $tomcat/bin/

./startup.sh

猜你喜欢

转载自mukeliang.iteye.com/blog/2372925