For a long time I've used a workaround for this problem that moves all sysklogd generated files to /var/log/syslog/ and then uses this logrotate config file:
Solves the problem cleanly, and I wish Debian would adopt this, but they're understandably concerned about moving the location of common log files.
Another approach would be to patch sysklogd to have a command line option where it will output the definitive list of log files parsed from its config file (supplanting the external shell script hack). Unfortunately you can't simply do `sysklogd --listfiles` in logrotate, due to its inflexibility. (Boggles the mind why a log rotation program was written in C instead of Perl. See also http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=326421 and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=353663 )
For a long time I've used a workaround for this problem that moves all sysklogd generated files to /var/log/syslog/ and then uses this logrotate config file:
/var/log/ syslog/ *.log {
sharedscripts
/etc/ init.d/ sysklogd reload-or-restart > /dev/null
olddir /var/log/syslog/old
postrotate
endscript
}
Solves the problem cleanly, and I wish Debian would adopt this, but they're understandably concerned about moving the location of common log files.
Another approach would be to patch sysklogd to have a command line option where it will output the definitive list of log files parsed from its config file (supplanting the external shell script hack). Unfortunately you can't simply do `sysklogd --listfiles` in logrotate, due to its inflexibility. (Boggles the mind why a log rotation program was written in C instead of Perl. See also http:// bugs.debian. org/cgi- bin/bugreport. cgi?bug= 326421 and http:// bugs.debian. org/cgi- bin/bugreport. cgi?bug= 353663 )