From f3fc047a0ed8aafba89bc4cc4bfb686f65341f8d 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:54 +0800 Subject: [PATCH] =?UTF-8?q?migrate=20=E7=AC=AC5=E6=AD=A5=EF=BC=9A=E6=94=B9?= =?UTF-8?q?=E7=94=A8=20pgrep=20-x=20anybot=EF=BC=88=E4=BE=9D=E7=A8=8B?= =?UTF-8?q?=E5=BC=8F=E5=90=8D=E7=B2=BE=E6=BA=96=E6=AF=94=E5=B0=8D=EF=BC=8C?= =?UTF-8?q?grep/pgrep/bash=20=E5=8C=85=E8=A3=85=E8=A1=8C=E9=83=BD=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E8=AF=AF=E4=B8=AD=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 10d1510..45756eb 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' | grep -v pgrep | head -1") +SERVE_LINE=$(ssh -o BatchMode=yes "$SSH_TARGET" "pgrep -x anybot -a | grep '/anybot --serve' | 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