Control: tags -1 patch

On Sat, Feb 01, 2025 at 09:24:31PM +0000, Andrew Bower wrote:
> wtmpdb will rotate logs but nothing will prune them (like logrotate would for
> other types of log - unfortunately it doesn't fit in well with the wtmpdb 
> way).

I have come up with a solution whereby a 'prune' systemd unit is chained
from the 'rotate' service. This calls into a script to prune logs beyond
a configured limit. One can disable the prun unit or edit it to adjust
the parameters.

Any feedback much appreciated!

https://salsa.debian.org/abower/wtmpdb/-/commit/512fa747f9943e1b8b4e7c169dabc1c67c004313
(branch 'log-pruning')

One nicety of the old wtmp logrotate config is that it wouldn't even
rotate until the log hit 1MB.

What do we think of that idea? It seems logical - no point in rotating
tiny files!

Reply via email to