...
- Generate logrotate config file for sysklogd. You can ask sysklogd what files it is currently logging to, and use that as input for the logrotate config file.
This ugly one liner will do the trick:
Change according to your needs - defaults are inCode Block echo -e "`printf \\"\"%s\\" \" \`syslogd-listfiles -a\`` {\n\tpostrotate\nsharedscriptsn\tsharedscripts\n\t\t/etc/init.d/sysklogd reload > /dev/null\n\tendscript\n}\n" > /etc/logrotate.d/sysklogd
/etc/logrotate.conf
- see man logrotate. Very useful option isdateext
. - Remove old sysklogd cron entries:
Code Block rm /etc/cron.*/sysklogd
...