2010-05-13 00:38:21 +02:00
|
|
|
# We set logfile_rotate=0 in squid.conf, which disables filename rotation
|
|
|
|
# by squid itself (as we'll let logrotate handle the filename rotation), but
|
|
|
|
# squid still closes and then reopens the logfile. The goal of this file is
|
|
|
|
# to rotate the logfile (rename it from squid.log to squid.log.1) without
|
|
|
|
# compressing it immediately, as squid will still be writing to the renamed
|
|
|
|
# log file. Then the postrotate script will tell squid to close and then
|
|
|
|
# reopen squid.log, effectively using the new logfile. The old logfile
|
|
|
|
# (squid.log.1) will be compressed by logrotate's next invocation.
|
2010-05-11 20:01:44 +02:00
|
|
|
/var/log/squid/*.log {
|
|
|
|
weekly
|
|
|
|
rotate 5
|
|
|
|
compress
|
2010-05-13 00:38:21 +02:00
|
|
|
delaycompress
|
2010-05-11 20:01:44 +02:00
|
|
|
notifempty
|
|
|
|
missingok
|
|
|
|
postrotate
|
|
|
|
/usr/sbin/squid -k rotate
|
|
|
|
endscript
|
|
|
|
}
|