mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-09-20 21:50:11 +08:00
!413 fix: 使用定时器而非服务来执行周期性更新检查
Merge pull request !413 from zinface/systemd/spark-update
This commit is contained in:
Vendored
+3
@@ -58,6 +58,9 @@ case "$1" in
|
||||
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
|
||||
|
||||
@@ -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 秒
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user