jboss 自动发布流程

#杀掉正在运行的jboss进程,xargs 把当前的管线里面的命令当做后面命令的执行参数
ps -ef | grep /appserver/jboss9980 | grep -v grep | awk  '{print $2}' | xargs  kill -9

#移除jboss下面的文件夹
rm -fr /appserver/jboss9980/server/default/deploy/eTax.war
rm -fr /appserver/jboss9980/server/default/work/jboss.web/localhost/etax
rm -fr /appserver/jboss9980/server/default/tmp

#解压war文件到jboss部署目录下
unzip -q /appserver/jboss9980war/eTax.war -d /appserver/jboss9980/server/default/deploy/eTax.war

#修改项目的参数文件 \cp 意思是强制覆盖,不提示
\cp /appserver/sitspecialConfig/app13/etax_init.properties  /appserver/jboss9980/server/default/deploy/eTax.war/WEB-INF/classes/
\cp /appserver/sitspecialConfig/app13/config.properties  /appserver/jboss9980/server/default/deploy/eTax.war/WEB-INF/classes/
\cp /appserver/sitspecialConfig/app13/uddi-address.xml  /appserver/jboss9980/server/default/deploy/eTax.war/WEB-INF/classes/


#启动当前的jboss进程
nohup /appserver/jboss9980/bin/./run.sh >/dev/null 2>&1 &

 

 

 


 

你可能感兴趣的:(jboss 自动发布流程)