From ea8165bbd8b24ab6667edad53d23ed30237f94d3 Mon Sep 17 00:00:00 2001 From: hz4th_coder Date: Sat, 12 Sep 2026 12:33:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=90=AF=E5=8A=A8=E8=84=9A?= =?UTF-8?q?=E6=9C=AC:=20=E6=94=B9=E7=94=A8=20openclaw=20conda=20=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=20python3=20(=E7=B3=BB=E7=BB=9F=20python3.10=20?= =?UTF-8?q?=E6=97=A0=20flask=20=E5=AF=BC=E8=87=B4=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5)=20(v2.2.2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 start.sh diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..b35a130 --- /dev/null +++ b/start.sh @@ -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))"