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

springboot 启动停止脚本

时间:2019-10-06 00:45:00      阅读:75      评论:0      收藏:0      [点我收藏+]

标签:htm   ref   star   ati   http   install   grep -v   bsp   process   

https://www.cnblogs.com/lovychen/p/6211209.html   参考

centos 转码解决方案:
yum install dos2unix

dos2unix **.sh

 

#!/bin/bash
pid=$(ps -ef | grep spring-boot-app.jar | grep -v grep | awk ‘{print $2}‘)
if [[ -z "${pid}" ]]
then
echo application is already stop
else
echo kill ${pid}
kill -9 ${pid}
fi


#!/usr/bin/env bash
pid=$(ps -ef | grep spring-boot-app.jar | grep -v grep | awk ‘{print $2}‘)
if [[ -z "${pid}" ]]
then
echo application is starting
nohup java -jar spring-boot-app.jar &
else
echo echo application alread start
echo process is ${pid}
fi

springboot 启动停止脚本

标签:htm   ref   star   ati   http   install   grep -v   bsp   process   

原文地址:https://www.cnblogs.com/javajetty/p/11626054.html

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