fix: modify the post-steps.sh

This commit is contained in:
2025-08-06 09:58:05 +08:00
parent dc70f38e29
commit 9ddb56fc7e

View File

@@ -2,7 +2,6 @@
PORT=8889 PORT=8889
JAR_PATH="/home/zhangbiqiong/pro_eld_mqtt_compare/target/pro_eld_mqtt_compare-0.0.1-SNAPSHOT.jar" JAR_PATH="/home/zhangbiqiong/pro_eld_mqtt_compare/target/pro_eld_mqtt_compare-0.0.1-SNAPSHOT.jar"
LOG_PATH="/home/zhangbiqiong/pro_eld_mqtt_compare/logs/pro_eld_mqtt_compare.log"
# 检测端口是否被占用 # 检测端口是否被占用
if netstat -tuln | grep -q ":$PORT"; then if netstat -tuln | grep -q ":$PORT"; then
@@ -10,6 +9,6 @@ if netstat -tuln | grep -q ":$PORT"; then
exit 0 exit 0
else else
echo "Port $PORT is free. Starting application..." echo "Port $PORT is free. Starting application..."
nohup java -jar "$JAR_PATH" > "$LOG_PATH" 2>&1 & nohup java -jar "$JAR_PATH" > /dev/null 2>&1 &
echo "Application started with PID $!" echo "Application started with PID $!"
fi fi