Package: cron-apt Version: 0.13.0.1 Severity: wishlist Hi,
would you be open to a patch that adds the possibility to use systemd timers? Quite some packages in Debian have adopted a way to run through systemd timers and systemd units on systems that have systemd, falling back to the "old" cron job configuration if there is no systemd. for example, apt is doing it this way. I am attaching the four preliminary systemd units I am using on a test system without problems. You might notice that they're using systemd's RandomizedDelaySec feature and call cron-apt -i instead. I find that more elegant. The systemd units would also make it easier to run with reduced privileges, having parts of the file system read-only and have other nice security features. My preliminary units don't do that yet, but I would be willing to do that if there is a chance to get the work into the package. Let me know what you think. Greetings Marc -- System Information: Debian Release: bookworm/sid APT prefers stable-security APT policy: (500, 'stable-security'), (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 5.18.3-zgsrv20080 (SMP w/4 CPU threads; PREEMPT) Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=en Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages cron-apt depends on: ii apt 2.5.0 Versions of packages cron-apt recommends: ii cron [cron-daemon] 3.0pl1-142 ii exim4-daemon-light [mail-transport-agent] 4.95-6 ii liblockfile1 1.17-1+b1 cron-apt suggests no packages. -- Configuration Files: /etc/cron-apt/config changed [not included] /etc/cron.d/cron-apt changed [not included] /etc/logrotate.d/cron-apt changed [not included] -- no debconf information
[Unit] Description=cron-apt [Service] ExecStart=/usr/sbin/cron-apt -i /etc/cron-apt/config Type=oneshot
[Unit] Description=Trigger daily cron-apt run [Timer] OnCalendar=*-*-* 00:00:00 RandomizedDelaySec=3600 [Install] WantedBy=multi-user.target
[Unit] Description=cron-apt %i [Service] ExecStart=/usr/sbin/cron-apt -i /etc/cron-apt/config /etc/cron-apt/config-%i Type=oneshot
[Unit] Description=Trigger hourly cron-apt run [Timer] OnCalendar=*-*-* *:00:00 RandomizedDelaySec=3600 [Install] WantedBy=multi-user.target