启动Spring boot服务脚本
#!/bin/bash cd /test java -jar test.jar &> ./test.log & echo "成功"
关闭Spring boot服务脚本
#!/bin/bash APP_NAME="test.jar" echo "stop SpringBoot Application" pid=`ps -ef | grep $APP_NAME | grep -v grep | awk ‘{print $2}‘` if [ -n "$pid" ] then kill -9 $pid fi
原文地址:https://www.cnblogs.com/jtnote/p/10844248.html
时间: 2024-10-09 19:53:20