From 2b31edd27344592d378e3b62f91d191e11391ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A7=E9=A9=8A?= Date: Thu, 19 Nov 2026 17:25:47 +0800 Subject: [PATCH] =?UTF-8?q?migrate=20=E7=AC=AC5=E6=AD=A5=EF=BC=9Apgrep=20?= =?UTF-8?q?=E8=87=AA=E5=8C=B9=E9=85=8D=E9=81=8E=E6=BF=BE=EF=BC=88ssh=20?= =?UTF-8?q?=E5=8C=85=E8=A3=9D=E8=A1=8C=E6=9C=AC=E8=BA=AB=E5=90=AB=E6=90=9C?= =?UTF-8?q?=E5=B0=8B=E5=AD=97=E4=B8=B2=EF=BC=8C=E6=90=B6=E8=B5=B0=20head?= =?UTF-8?q?=20-1=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/migrate-relay.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/migrate-relay.sh b/deploy/migrate-relay.sh index 5427d68..10d1510 100755 --- a/deploy/migrate-relay.sh +++ b/deploy/migrate-relay.sh @@ -134,7 +134,7 @@ fi # ---------- 5. 大脑改接新 relay ---------- say "5/7 大腦那台的 AnyBot 改接新帳號伺服器" # 只认带绝对路径的宿主进程行(Docker 容器里的 anybot 在主机上喊不到)。 -SERVE_LINE=$(ssh -o BatchMode=yes "$SSH_TARGET" "pgrep -af 'anybot --serve' | grep '/anybot --serve' | head -1") +SERVE_LINE=$(ssh -o BatchMode=yes "$SSH_TARGET" "pgrep -af 'anybot --serve' | grep '/anybot --serve' | grep -v pgrep | head -1") BIN=$(printf '%s' "$SERVE_LINE" | grep -o '/[^ ]*/anybot' | head -1) DDIR=$(printf '%s' "$SERVE_LINE" | grep -o -- '--data-dir [^ ]*' | cut -d' ' -f2) if [ -z "$BIN" ]; then