From 582435b8579440b2e4e60716a17cdfca1edc8c13 Mon Sep 17 00:00:00 2001 From: zinface Date: Mon, 17 Aug 2026 21:53:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BD=BF=E7=94=A8=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E5=99=A8=E8=80=8C=E9=9D=9E=E6=9C=8D=E5=8A=A1=E6=9D=A5=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E5=91=A8=E6=9C=9F=E6=80=A7=E6=9B=B4=E6=96=B0=E6=A3=80?= =?UTF-8?q?=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/postinst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/debian/postinst b/debian/postinst index fa7da52d..1588cc2f 100755 --- a/debian/postinst +++ b/debian/postinst @@ -55,9 +55,12 @@ case "$1" in # Start upgrade detect service systemctl daemon-reload - systemctl enable spark-update-notifier - systemctl start spark-update-notifier - + # systemctl enable spark-update-notifier + # systemctl start spark-update-notifier + + # like apt-daily.timer + systemctl enable spark-update-notifier.timer + systemctl start spark-update-notifier.timer # Update certain caches cp -fv /opt/spark-store/extras/store.spark-app.spark-store.policy /usr/share/polkit-1/actions/store.spark-app.spark-store.policy From b87112fa38eefc303cdc5d30dcd8b178860b4450 Mon Sep 17 00:00:00 2001 From: zinface Date: Tue, 18 Aug 2026 09:14:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(systemd):=20=E5=88=86=E6=9E=90=20timer?= =?UTF-8?q?=20=E6=97=A0=E6=95=88=E5=8E=9F=E5=9B=A0=E5=8F=8A=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 我看了下,这 timer 无效有几个原因 1. timer 本身要 enable 和 start 2. service 里要去掉 RemainAfterExit=yes 这条(不能让服务一直处于 activate) 3. timer 重新设计更新触发时间(6,12,18:00) 一天更新3次,分布到 30min 内 4. service 重新保持开机运行一次(撤回提交中的部分修改) 起码确定这不是服务器,不再 6h 分布,而是桌面系统,及时在到达时间后,在30min内完成更新(也同样不拥挤在一块),话说回来,到点后,在30分钟内统一更新所有安装了星火应用商店的机器,这用户量应该能支撑得住噻? --- debian/postinst | 4 ++-- pkg/usr/lib/systemd/system/spark-update-notifier.service | 1 - pkg/usr/lib/systemd/system/spark-update-notifier.timer | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/debian/postinst b/debian/postinst index 1588cc2f..8a874197 100755 --- a/debian/postinst +++ b/debian/postinst @@ -55,8 +55,8 @@ case "$1" in # Start upgrade detect service systemctl daemon-reload - # systemctl enable spark-update-notifier - # systemctl start spark-update-notifier + systemctl enable spark-update-notifier + systemctl start spark-update-notifier # like apt-daily.timer systemctl enable spark-update-notifier.timer diff --git a/pkg/usr/lib/systemd/system/spark-update-notifier.service b/pkg/usr/lib/systemd/system/spark-update-notifier.service index 62263a13..f497463a 100644 --- a/pkg/usr/lib/systemd/system/spark-update-notifier.service +++ b/pkg/usr/lib/systemd/system/spark-update-notifier.service @@ -4,7 +4,6 @@ After=apt-daily.service network.target network-online.target systemd-networkd.se [Service] Type=simple -RemainAfterExit=yes ExecStart=/opt/durapps/spark-store/bin/update-upgrade/ss-update-notifier.sh Restart=on-failure RestartSec=15 # 可以设置为更长的重试间隔,比如 15 秒或 30 秒 diff --git a/pkg/usr/lib/systemd/system/spark-update-notifier.timer b/pkg/usr/lib/systemd/system/spark-update-notifier.timer index 214f23dd..ee31299c 100644 --- a/pkg/usr/lib/systemd/system/spark-update-notifier.timer +++ b/pkg/usr/lib/systemd/system/spark-update-notifier.timer @@ -2,8 +2,8 @@ Description=Spark Store update notifier [Timer] -OnCalendar=*-*-* 6,18:00 -RandomizedDelaySec=12h +OnCalendar=*-*-* 6,12,18:00 +RandomizedDelaySec=30m Persistent=true [Install]