其中的jar包改成你自己的
start.sh
nohup java -jar mydepartment-0.0.1-SNAPSHOT.jar & echo Start Success!stop.sh
#!/bin/bash PID=$(ps -ef | grep mydepartment-0.0.1-SNAPSHOT.jar | grep -v grep | awk '{ print $2 }') if [ -z "$PID" ] then echo Application is already stopped else echo kill $PID kill $PID firestart.sh
#!/bin/bash echo stop application source ./stop.sh echo start application source ./start.shcheck.sh
#!/bin/sh APP_NAME=mydepartment-0.0.1-SNAPSHOT tpid=`ps -ef|grep $APP_NAME|grep -v grep|grep -v kill|awk '{print $2}'` if [ ${tpid} ]; then echo 'App is running.' else echo 'App is NOT running.' fiDocker部署Spring Boot项目