Bug#932328: logrotate.timer "breaks" activity report of /etc/cron.daily/exim4-base
Andreas Metzler
ametzler at bebt.de
Sun Jul 28 17:53:45 BST 2019
On 2019-07-18 Sven Hartge <sven at svenhartge.de> wrote:
> On 17.07.19 20:46, Sven Hartge wrote:
>> Possible solution (untested): Also create a exim4-base.timer and
>> .service and create a Before= dependency on logrotate.service.
> I've whipped up a little Proof-of-Concept to test this, available also
> at https://salsa.debian.org/hartge-guest/exim4/tree/systemd-timer
> I'm testing this right now on two of my systems to see how this behaves,
> especially the Before=logrotate.{service,timer} ordering.
Hello Sven,
I /think/ setting Before= in *both* .service and .timer is strange.
Is this supposed to work like this?
1. When systemd looks at the timers it finds that both logratoe and exim
have identical time specifications. With the Before= setting it
triggers logrotate.service after exim.service. Otherwise it might work
out the other way round, or they are started in parallel.
2. When running exim.service systemd again finds a Before= and waits
with starting log-rotation until after exim's job has finished?
Thanks for the hand holding.
(FWIW on my system I have only a single timer/service pair that uses
Before/After - apt-daily-upgrade/apt-daily and they do it exactly the
way you suggested.)
cu Andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
More information about the Pkg-exim4-maintainers
mailing list