:: Re: [DNG] Log rotation keeps rotate…
Top Page
Delete this message
Reply to this message
Author: Lorenz
To: kc-devuan
CC: dng
Subject: Re: [DNG] Log rotation keeps rotated file open

Il giorno lun 27 mag 2024 alle ore 13:39 <kc-devuan@???> ha scritto:
> 27 May 2024 12:16:44 Lorenz via Dng <dng@???>:
> > Thoughts?
> Ignore me if I am missing the details but could the if check be expanded to include runit in /usr/lib/rsyslog/rsyslog-rotate?

this will work on Devuan where (I think) rsyslog package is forked,
but not on Debian;
I'm looking for a solution that works everywhere (Debian, Devuan and
other downstream).

The Debian maintainer of rsyslog removed support for sysvinit, so
adding code for
runit won't happen..
So far I had the following ideas:

A) log to stdout and use svlogd (see above)

B) hijack rsyslog logrotate config file; reading logrotate(8) it seems that
    /etc/logrotate.d/00-rsyslog.runit is processed before /etc/logrotate/rsyslog
    and the latter becames a no-op (file already rotated are skipped).
    This could still surprise users (local changes to /etc/logrotate/rsyslog
     are silently ignored), but less suprising than A

C) divert /etc/logrotate/rsyslog (/usr/lib/rsyslog/rsyslog-rotate is
     already diverted by orphan-sysvinit-scripts); this doesn't scale
     for alternative inits as other future packages like s6-services
     or openrc-services are left without options except conflicts
     with runit-services