修复启动脚本: 改用 openclaw conda 环境 python3 (系统 python3.10 无 flask 导致启动失败) (v2.2.2)

This commit is contained in:
2026-09-12 12:33:51 +08:00
parent 2d5abe5975
commit ea8165bbd8
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
# param-hub 启动脚本(setsid 完全脱离终端,确保持久运行)
APP_DIR="$(cd "$(dirname "$0")" && pwd)"
PID_FILE="$APP_DIR/app.pid"
PYTHON="/home/hz1/miniconda3/envs/openclaw/bin/python3"
cd "$APP_DIR"
if [ -f "$PID_FILE" ]; then
PID=$(cat "$PID_FILE")
if ps -p $PID > /dev/null 2>&1; then
echo "param-hub 已在运行 (PID: $PID)"
exit 0
fi
fi
setsid nohup "$PYTHON" app.py > logs/app.log 2>&1 &
echo $! > "$PID_FILE"
sleep 2
echo "param-hub 已启动 (PID: $(cat $PID_FILE))"