#1151023 Add systemd unit to run logcheck at boot

#1151023#5
Date:
2026-10-16 02:10:49 UTC
From:
To:
Before the switch to the systemd service/timer, logcheck would send a
"reboot" email after the system is started up. This had two nice
effects:

* Receiving the email would mean the server is back up and has network
connectivity
* Boot messages would be (mostly) gathered in this email, leaving the
next scheduled logcheck email to contain messages that require more
attention

I have added a local service to replicate the cron behaviour, but it
would be great if this can be done in the package - thanks.

#1151023#10
Date:
2026-10-18 11:24:02 UTC
From:
To:
Dear Maintainer,

Indeed, this change caught us by surprise after the upgrade to Debian
13, as Jeffrey already pointed out the previous behavior made a lot of
sense, so it would be great to see it restored, i.e. by having another
set of logcheck-on-boot.{service,timer} units using OnBootSec and the -R
option when calling logcheck in the ExecStart.

For the time being, as quick fix, removing

 [ ! -d /run/systemd/system ] &&

from the @reboot line /etc/cron.d/logcheck, so it's again as before the
upgrade to Debian 13

@reboot         logcheck    if [ -x /usr/sbin/logcheck ]; then nice -n10 /usr/sbin/logcheck -R; fi

will also give you back the 'Reboot:'-prefixed mail messages.

Cheers
Wolfgang