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

Mike Gabriel (@sunweaver) gitlab at salsa.debian.org
Thu Sep 21 07:17:21 BST 2023



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


Commits:
3ca67b00 by Guido Berhoerster at 2023-09-20T09:09:54+02: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/3ca67b00924eb1aebf1e1161cca5d642bd3a715e

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/upstream/sitesummary/-/commit/3ca67b00924eb1aebf1e1161cca5d642bd3a715e
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/20230921/f8456966/attachment-0001.htm>


More information about the debian-edu-commits mailing list