标签:jenkins startup files div 仓库 process 解压 com unzip
[root@jenkins-ansible-jumpserver sh]# cat deploy_weifeng_dev.sh #!/bin/bash # kill tomcat进程 tomcat_fashion_bi_dev_pid=`ps aux|grep weifeng|grep -v "grep"|awk ‘{print $2}‘` if [ "$tomcat_fashion_bi_dev_pid" ];then ps aux|grep weifeng|grep -v "grep"|awk ‘{print $2}‘|xargs kill -9 echo "old tomcat weifeng dev process is killed" fi rm -rf /home/deploy/weifeng/dev/deploy_files/* echo "delete old project files /home/deploy/weifeng/dev/deploy_files" #解压war包到 代码执行地方 cd /home/deploy/weifeng/dev/ unzip -oq deepfashion-fashionbi.war -d /home/deploy/weifeng/dev/deploy_files/ #重启tomcat cd /home/deploy/tomcat_weifeng_dev/bin sh startup.sh sleep 5 tomcatport=` netstat -lntp|grep "8080"|awk ‘{print $4}‘|awk -F":" ‘{print $2}‘` echo $tomcatport if [ "$tomcatport" ];then echo -e "\033[32m[ tomcat weifeng started success on dev env ! ]\033[0m" fi
标签:jenkins startup files div 仓库 process 解压 com unzip
原文地址:https://www.cnblogs.com/weifeng1463/p/9701058.html