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]