If munin is installed in a minimal Debian bookworm container (e.g. with "mmdebstrap --variant=minbase") that does not have a cron installed,
then it never runs.
Before systemd I would have perhaps asked that cron be added as an
explicit dependency. However, given that systemd is now a default
package then I guess systemd timers and services would be more
appropriate to include and enable (and start?).
As a starting point, the following config files have at least begun populating /var/lib/munin with rrd files for me.[...]
mark@mon:/etc/systemd/system$ cat munin-update.timer
mark@mon:/etc/systemd/system$ cat munin-update.service[...]
ISTM the canonical way is exiting the cron job, like this:
if [ -d /run/systemd/system ]; then
exit 0
fi
On Sat, Apr 12, 2025 at 02:26:44PM +0000, Holger Levsen wrote:
I'm also wondering how to both ship the crontab entries for systems not
running systemd while at the same preventing dual runs via systemd timer
and cron. I'd appreciate pointers or insight on this!
ISTM the canonical way is exiting the cron job, like this:
% head -n 13 /etc/cron.daily/apt-compat
#!/bin/sh
set -e
# Systemd systems use a systemd timer unit which is preferable to
# run. We want to randomize the apt update and unattended-upgrade
# runs as much as possible to avoid hitting the mirrors all at the
# same time. The systemd time is better at this than the fixed
# cron.daily time
if [ -d /run/systemd/system ]; then
exit 0
fi
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 491 |
Nodes: | 16 (2 / 14) |
Uptime: | 129:03:19 |
Calls: | 9,688 |
Calls today: | 4 |
Files: | 13,728 |
Messages: | 6,177,419 |