supervision-edh/deploy/start.sh

17 lines
403 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 创建日志目录
mkdir -p ./logs
# 启动应用并后台运行仅保留edh-server.log
nohup java -jar supervision-edh-1.0.0.jar \
--logging.file.path=./logs \
--logging.file.name=./logs/edh-server.log \
> /dev/null 2>&1 &
# 记录PID
echo $! > ./edh-server.pid
echo "应用已在后台运行"
echo "PID: $(cat ./edh-server.pid)"
echo "日志文件: ./logs/edh-server.log"