Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. 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:
    Code 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
    
    Change according to your needs - defaults are in /etc/logrotate.conf - see man logrotate. Very useful option is dateext.
  2. Remove old sysklogd cron entries:
    Code Block
    rm /etc/cron.*/sysklogd
    

...