[debian-edu-commits] [Git][debian-edu/upstream/sitesummary][bookworm] Use systemd timer for running sitesummary-client if available

Mike Gabriel (@sunweaver) gitlab at salsa.debian.org
Sun Nov 19 11:39:19 GMT 2023



Mike Gabriel pushed to branch bookworm at Debian Edu / upstream / sitesummary


Commits:
f49a54a4 by Guido Berhoerster at 2023-11-19T10:37:55+01:00
Use systemd timer for running sitesummary-client if available

This avoids problems with the cron.daily script for sitesummary-client which
sleeps a random number of seconds up to an hour blocking other anacron jobs and
preventing a stop of the anacron systemd service which has an infinite stop
timeout and in turn blocks system shutdown and reboot (Closes: #1052247).

- - - - -


2 changed files:

- debian/sitesummary-client.cron.daily
- debian/sitesummary-client.sitesummary-client.timer


Changes:

=====================================
debian/sitesummary-client.cron.daily
=====================================
@@ -2,7 +2,10 @@
 #
 # Author: Petter Reinholdtsen
 
-[ -x /usr/sbin/sitesummary-client ] || exit 0
+if [ ! -x /usr/sbin/sitesummary-client ] || \
+    [ -d /run/systemd/system ]; then
+    exit 0
+fi
 
 # Read the package default.  Make sure this is identical to the code
 # in sitesummar-client


=====================================
debian/sitesummary-client.sitesummary-client.timer
=====================================
@@ -3,6 +3,9 @@ Description=Timer for sitesummary reporting after boot
 
 [Timer]
 OnBootSec=5min
+OnCalendar=*-*-* 00:00:00
+RandomizedDelaySec=1h
+FixedRandomDelay=true
 
 [Install]
 WantedBy=timers.target



View it on GitLab: https://salsa.debian.org/debian-edu/upstream/sitesummary/-/commit/f49a54a4ab379f1b6181ea04a5f75a565333134d

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/upstream/sitesummary/-/commit/f49a54a4ab379f1b6181ea04a5f75a565333134d
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20231119/e11930ba/attachment-0001.htm>


More information about the debian-edu-commits mailing list