sirio81 at gmail.com
Wed Oct 8 17:18:58 CEST 2014
2014-10-08 13:48 GMT+02:00 Marcin Mirosław <marcin at mejor.pl>:
> # taken from rsyslog conf on debian
> invoke-rc.d rsyslog rotate > /dev/null
> And, surely, init script should handle "rotate" (or e.g. "reload") and
> sends HUP to daemon.
The issue is that sheeppdog is writing on sheep.log.
This get renamed by rsyslog to sheep.log.1 and it creates a new sheep.log.
Sheep process continue to write anyway in the old file (now sheep.log.1).
We can't stop and start sheep daemon before (prerotate) or after
(postrotate) to avoid triggering a recovery.
Ops, I notice now on my previous mail I copy pasted the old config
without 'copytruncate' option.
Using truncate, the file sheep.log doesn't get renamed (but truncated).
Doing so, sheep process can continue writing on it.
As you suggest, this has to be handled by init script.
If I'm missing something about logrotate that I don't know, please tell me.
More information about the sheepdog-users