[systemd-devel] How to chain services driven by a timer?
Dan Nicholson
dbn at endlessos.org
Wed Apr 10 19:47:47 UTC 2024
On Wed, Apr 10, 2024 at 1:32 PM Brian Reichert <reichert at numachi.com> wrote:
>
> On Wed, Apr 10, 2024 at 10:21:32PM +0300, Andrei Borzenkov wrote:
> > On 10.04.2024 22:04, Brian Reichert wrote:
> > > [Install]
> > > WantedBy=logrotate.service
> > >
> >
> > Links in [Install] section are created by "systemctl enable".
>
> I could have sworn I did this, but did so (again) just to be sure:
>
> 10-153-68-34:~ # systemctl enable post-logrotate.service
> Created symlink from
> /etc/systemd/system/logrotate.service.wants/post-logrotate.service to
> /etc/systemd/system/post-logrotate.service.
>
> 10-153-68-34:~ # systemctl restart logrotate.timer
>
> 10-153-68-34:~ # systemctl status logrotate.service
Restarting the timer doesn't make the service run immediately. Are you
sure logrotate.service has run again since you made this change? Just
simulate the timer and start logrotate.service again. All the timer
does is activate the service. For testing you don't need to wait for
that to happen.
--
Dan
More information about the systemd-devel
mailing list