[systemd-devel] How to chain services driven by a timer?
Brian Reichert
reichert at numachi.com
Wed Apr 10 19:32:16 UTC 2024
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
â logrotate.service - Rotate log files
Loaded: loaded (/usr/lib/systemd/system/logrotate.service; static; vendor
preset: disabled)
Active: inactive (dead) since Wed 2024-04-10 14:58:31 EDT; 28min ago
Docs: man:logrotate(8)
man:logrotate.conf(5)
Main PID: 17686 (code=exited, status=0/SUCCESS)
Apr 10 14:58:29 10-153-68-34 systemd[1]: Starting Rotate log files...
Apr 10 14:58:31 10-153-68-34 systemd[1]: Started Rotate log files.
10-153-68-34:~ # systemctl status post-logrotate.service
â post-logrotate.service - Activities after logrotation
Loaded: loaded (/etc/systemd/system/post-logrotate.service; enabled;
vendor preset: disabled)
Active: inactive (dead)
I don't see post-logrotate.service has having been run.
--
Brian Reichert <reichert at numachi.com>
BSD admin/developer at large
More information about the systemd-devel
mailing list