From bbe711b1cebf252e44e84e2bcd93eab9f0212418 Mon Sep 17 00:00:00 2001 From: juewuy Date: Tue, 27 Jan 2026 17:33:52 +0800 Subject: [PATCH] =?UTF-8?q?~=E4=BF=AE=E5=A4=8D=E5=81=9C=E6=AD=A2=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E6=97=B6=E6=9C=AA=E5=90=8C=E6=AD=A5=E5=81=9C=E6=AD=A2?= =?UTF-8?q?tg=5Fbot=E8=BF=9B=E7=A8=8B=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/menus/bot_tg_service.sh | 2 +- scripts/start.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/menus/bot_tg_service.sh b/scripts/menus/bot_tg_service.sh index 67a2ee10..62ede38b 100644 --- a/scripts/menus/bot_tg_service.sh +++ b/scripts/menus/bot_tg_service.sh @@ -9,7 +9,7 @@ bot_tg_start(){ } bot_tg_stop(){ cronset 'TG_BOT守护进程' - [ -f "$TMPDIR/bot_tg.pid" ] && kill -TERM "$(cat "$TMPDIR/bot_tg.pid")" + [ -f "$TMPDIR/bot_tg.pid" ] && kill -TERM "$(cat "$TMPDIR/bot_tg.pid")" 2>/dev/null killall bot_tg.sh 2>/dev/null rm -f "$TMPDIR/bot_tg.pid" } diff --git a/scripts/start.sh b/scripts/start.sh index 7c60cf8d..190ba3f1 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -71,9 +71,11 @@ stop) cronset '保守模式守护进程' cronset '运行时每' cronset '流媒体预解析' + #停止tg_bot + . "$CRASHDIR"/menus/bot_tg_service.sh && bot_tg_stop #多种方式结束进程 if [ -f "$TMPDIR/shellcrash.pid" ];then - kill -TERM "$(cat "$TMPDIR/shellcrash.pid")" + kill -TERM "$(cat "$TMPDIR/shellcrash.pid")" 2>/dev/null rm -f "$TMPDIR/shellcrash.pid" stop_firewall elif [ "$USER" = "root" ] && grep -q 'systemd' /proc/1/comm; then