[mythtv-users] mythbackend.log is buffered?

Eric Sharkey eric at lisaneric.org
Mon Oct 26 14:17:13 UTC 2015


On Mon, Oct 26, 2015 at 10:12 AM, Simon Hobson <linux at thehobsons.co.uk> wrote:
> Karl Newman <newmank1 at asme.org> wrote:
>
>> So probably the solution would be to add a `killall -HUP mythbackend` (or mythlogserver?) lastaction command to the logrotate config.
>
> That sounds a bit drastic, but somehow you have to get the program to start writing to a different log file.

The HUP signal is the standard way to do that.  The deb multimedia
packages have:

mythtered% cat /etc/logrotate.d/mythlogserver
/var/log/mythtv/*.log {
        daily
        rotate 7
        notifempty
        delaycompress
        sharedscripts
        compress
        postrotate
                if [ -z "pidof mythlogserver" ]; then
                        pkill -HUP mythlogserver
                fi
        endscript
        su mythtv mythtv
}

Eric


More information about the mythtv-users mailing list