linux 优雅关闭springboot然后自动启动最新jar包的脚本命令
作者:互联网
reload-jar.sh
#!/bin/bash cd /data/energy/jar/ echo "change dir success" sleep 2s curl -X POST "http://127.0.0.1:12315/restartactuator/shutdown" printf "\nstop success" sleep 2s echo "start jar" FILENAME=`ls /data/energy/jar/energy-* -t |head -n1|awk '{print $0}'` nohup java -jar $FILENAME --spring.profiles.active=prod > /dev/null 2>&1 & echo "jar run success"
标签:springboot,success,energy,jar,echo,linux,FILENAME,data 来源: https://www.cnblogs.com/qianxiaoPro/p/15028894.html