修改启动脚本

This commit is contained in:
Tian jianyong 2025-10-17 11:43:56 +08:00
parent 4f2a53925e
commit 8d9d62cf4f
2 changed files with 4 additions and 13 deletions

13
mock.sh
View File

@ -27,17 +27,8 @@ start() {
if pgrep -f "$service" > /dev/null; then
echo " $service 已在运行"
else
case "$service" in
"mock_airport.py")
nohup python3 "$service" > "../$LOGS_DIR/airport.log" 2>&1 &
;;
"mock_traffic_light.py")
nohup python3 "$service" > "../$LOGS_DIR/traffic_light.log" 2>&1 &
;;
"mock_unmanned_vehicle.py")
nohup python3 "$service" > "../$LOGS_DIR/unmanned_vehicle.log" 2>&1 &
;;
esac
# 各个mock服务已经有自己的日志管理不需要重定向输出
nohup python3 "$service" > /dev/null 2>&1 &
echo " $service 已启动"
fi
done

4
qaup.sh Normal file → Executable file
View File

@ -45,8 +45,8 @@ start() {
echo "正在启动 $APP_NAME..."
# 启动应用
nohup java $JVM_OPTS -jar "$APP_NAME" > /dev/null 2>&1 &
# 临时将输出重定向到当前目录的日志文件,以便调试启动问题
nohup java $JVM_OPTS -jar "$APP_NAME" > startup.log 2>&1 &
# 等待一会儿检查是否启动成功
sleep 2