From 33753561432ac395de60e3feca62f25ec40a048b Mon Sep 17 00:00:00 2001 From: hotyue <52734432+hotyue@users.noreply.github.com> Date: Sun, 26 Apr 2026 01:23:26 +0000 Subject: [PATCH] =?UTF-8?q?fix(core):=20=E5=BD=BB=E5=BA=95=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20Alpine/OpenRC=20=E7=8E=AF=E5=A2=83=E4=B8=8B=20crond?= =?UTF-8?q?=20=E8=B0=83=E5=BA=A6=E5=99=A8=E8=B7=AF=E5=BE=84=E5=89=B2?= =?UTF-8?q?=E8=A3=82=E4=B8=8E=E5=81=87=E6=AD=BB=E7=9A=84=E9=A1=BD=E7=96=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/install.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/core/install.sh b/core/install.sh index d41848d..617925a 100755 --- a/core/install.sh +++ b/core/install.sh @@ -793,7 +793,24 @@ EOF nohup bash "${INSTALL_DIR}/core/agent_daemon.sh" >/dev/null 2>&1 & fi + + # 写入标准的 spool 目录 [ -f /tmp/cron_backup ] && crontab /tmp/cron_backup 2>/dev/null + + # [极限修补] 针对 Alpine/Busybox 的路径割裂顽疾,双向强行同步配置 + if [ -d "/etc/crontabs" ] && [ -f "/var/spool/cron/crontabs/root" ]; then + cp -f /var/spool/cron/crontabs/root /etc/crontabs/root 2>/dev/null || true + chmod 600 /etc/crontabs/root 2>/dev/null || true + fi + + # 强行唤醒/重启大管家,让它立刻重新读档 + if command -v rc-service >/dev/null 2>&1; then + rc-service crond restart 2>/dev/null || crond -b 2>/dev/null + else + pkill -9 crond 2>/dev/null || true + crond -b 2>/dev/null || true + fi + rm -f /tmp/cron_backup fi