diff --git a/bin/sh/app-prd.sh b/bin/sh/app-prd.sh index 79a9de8be..8874bc153 100644 --- a/bin/sh/app-prd.sh +++ b/bin/sh/app-prd.sh @@ -32,7 +32,9 @@ start(){ else # 如果应用没有运行,则启动应用,并将输出重定向到 nobup.log 文件 # 注意:nohup 应该是 nohup 的拼写错误 + echo "jsowell-admin.jar 正在启动..." nohup java -Xms12g -Xmx12g -XX:+UseG1GC -jar /opt/app/spring/jar/jsowell-admin.jar --spring.profiles.active=prd >/dev/null 2>&1 & + echo "jsowell-admin.jar 启动完成..." fi } @@ -45,6 +47,7 @@ stop(){ kill -9 $pid # 输出停止应用的提示信息 echo "Stopped ${APP_NAME} running on port $PORT." + echo "jsowell-admin.jar已停止..." else # 如果应用没有运行,则输出提示信息 echo "${APP_NAME} is not running on port $PORT." diff --git a/bin/sh/app-pre.sh b/bin/sh/app-pre.sh index 46457dbb6..65a24ca97 100644 --- a/bin/sh/app-pre.sh +++ b/bin/sh/app-pre.sh @@ -1,13 +1,13 @@ #!/bin/bash # 声明应用的名称和使用的端口号 -APP_NAME=jsowell-admin.jar -PORT=8080 # 假设应用绑定到这个端口 - +APP_NAME=jsowell-admin.jar +PORT=8080 # 假设应用绑定到这个端口 + # 使用函数来显示脚本的使用方式,并退出脚本 usage() { echo "Usage: sh app.sh [start|stop|restart|status]" exit 1 -} +} # 检查应用是否已经在运行 is_exist(){