Logrotate - all applications

From MythTV Official Wiki
Revision as of 20:50, 3 August 2012 by Beirdo (talk | contribs) (Add version for 0.26)

Jump to: navigation, search

For most distros, save the configuration file to /etc/logrotate.d/mythtv

Log rotation with --logpath logging

This configuration will work with MythTV logging for all MythTV applications using either the --logpath or --syslog argument. If using this configuration, other MythTV logrotate configuration files are unnecessary.


Author Beirdo
Description Example configuration file for using logrotate to rotate your MythTV log files.
Supports Version25.png  


Script.png /etc/logrotate.d/mythtv

/var/log/mythtv/*.log {
        weekly
        rotate 8
        missingok
        ifempty
        nocreate
        nocompress
        sharedscripts
        olddir /var/log/mythtv/old
        lastaction
                killall -HUP mythbackend
                killall -HUP mythfrontend
                killall -HUP mythlcdserver
                find /var/log/mythtv/old -type f -mtime +30 -delete
        endscript
}   



Author Beirdo
Description Example configuration file for using logrotate to rotate your MythTV log files (for 0.26)
Supports Version26.png 


Script.png /etc/logrotate.d/mythtv

/var/log/mythtv/*.log {
        weekly
        rotate 8
        missingok
        ifempty
        nocreate
        nocompress
        sharedscripts
        olddir /var/log/mythtv/old
        lastaction
                killall -HUP mythlogserver
                find /var/log/mythtv/old -type f -mtime +30 -delete
        endscript
}