Restart rsyslogd after logrotate
The copytruncate directive in logrotate configuration truncates the log file so that processes can keep using the same file descriptor to write to the log file. The truncation, however, does not work well with rsyslog forwarding as rsyslog fails to figure out the difference from last sent messages. This change restarts rsyslogd in postrotate directive of logrotate such as rsyslog will start with a new baseline and continue forwarding logs. Closes-Bug: 1564654 Change-Id: Ied15bc73e5af78bfcc1430db787b61d65a9bc044 Signed-off-by: Shu Shen <sshen@siaras.com>
This commit is contained in:
parent
2246bd2bee
commit
04b8a98f2b
|
@ -11,4 +11,7 @@
|
|||
maxage 60
|
||||
notifempty
|
||||
nocreate
|
||||
postrotate
|
||||
restart rsyslog 2>&1 || true
|
||||
endscript
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue