From 1afb261d0edfe231f928eb6ce99ddf9060f94932 Mon Sep 17 00:00:00 2001 From: juewuy Date: Sun, 8 Feb 2026 20:13:55 +0800 Subject: [PATCH] =?UTF-8?q?~=E4=BC=98=E5=8C=96=E5=AE=9A=E6=97=B6=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/libs/set_cron.sh | 1 - scripts/menus/bot_tg_service.sh | 2 +- scripts/start.sh | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/libs/set_cron.sh b/scripts/libs/set_cron.sh index 1fcd306f..fddf57ad 100644 --- a/scripts/libs/set_cron.sh +++ b/scripts/libs/set_cron.sh @@ -36,5 +36,4 @@ cronset() { #定时任务设置 else rm -f "$tmpcron" fi - sleep 1 } diff --git a/scripts/menus/bot_tg_service.sh b/scripts/menus/bot_tg_service.sh index d686d337..1153d323 100644 --- a/scripts/menus/bot_tg_service.sh +++ b/scripts/menus/bot_tg_service.sh @@ -7,7 +7,7 @@ bot_tg_start(){ bot_tg_cron } bot_tg_stop(){ - cronset 'TG_BOT守护进程' + cronload | grep -q 'TG_BOT' && cronset 'TG_BOT' [ -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 287958bd..03c3cc0f 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -67,10 +67,10 @@ start) stop) logger ShellCrash服务即将关闭…… [ -n "$(pidof CrashCore)" ] && web_save #保存面板配置 - #删除守护进程&面板配置自动保存 - cronset '保守模式守护进程' - cronset '运行时每' - cronset '流媒体预解析' + #清理定时任务 + cronload | grep -vE '^$|start_legacy_wd.sh|运行时每' > "$TMPDIR"/cron_tmp + cronadd "$TMPDIR"/cron_tmp + rm -f "$TMPDIR"/cron_tmp #停止tg_bot . "$CRASHDIR"/menus/bot_tg_service.sh && bot_tg_stop #多种方式结束进程