I was wondering if it's possible to use prerotate and postrotate in logrotate.conf.
The thing is I want to make logs append only, normally I'd add chattr -a
to prerotate and chattr +a
to postrotate in scripts in /etc/logrotate.d
, but what if I want this to be default setting for all logs? Can it be defined in logrotate.conf
? What about the filename? Or am I doing it completely wrong and there is another way to make all logs handled by logrotate append-only?