码迷,mamicode.com
首页 > 编程语言 > 详细

自动部署Springboot项目脚本小脚本

时间:2020-06-06 12:54:46      阅读:130      评论:0      收藏:0      [点我收藏+]

标签:gre   上传   print   grep   ack   项目   结束   else   The   

#!/bin/bash
 echo ‘自动部署Springboot项目脚本...‘
# aaa.jar 项目jar包
pid=`ps -ef|grep aaa.jar|grep -v grep|grep -v restart|awk ‘{print$2}‘`
if [ -n "${pid}" ] ;then
     kill -9 ${pid}
 echo ‘进程已经结束‘
     sleep 5
# 备份一份其他覆盖 mv aaa.jar backups/ echo ‘文件移动‘ sleep 5 fi if [ -f "/spring/aaa.jar" ];then nohup java -jar aaa.jar > log.out echo "文件夹存在" else echo "请上传需要发布的项目" fi echo ‘脚步执行结束‘

 

自动部署Springboot项目脚本小脚本

标签:gre   上传   print   grep   ack   项目   结束   else   The   

原文地址:https://www.cnblogs.com/bigsiji/p/13054072.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!