[systemd-devel] Q: Implementing logrotate's postrotate with systemd

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Tue Jun 11 11:34:47 UTC 2019


Hi!

I have a forking service (with a PID file) that can reopen the logfile after receiving SIGHUP. In the past I had implemented "rc{service} rotate" to send SIGHUP to the daemon as "postrotate" action. After converting (actually being converted ;-)) to systemd I dropped the LSB script, and wonder which command to use as "postrotate" action:

Should I implement a oneshot service (using "systemctl start {service}") that does depend on the actual service and send a SIGHUP on start, or is there a more elegent solution?

Regards,
Ulrich





More information about the systemd-devel mailing list