diff --git a/scripts/menus/bot_tg_service.sh b/scripts/menus/bot_tg_service.sh index 53d92339..ecc07793 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 ea7097d5..f254e1d1 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