[squid-users] rotate logfiles with multiple instances of squid

From: Ross Tsolakidis <Ross.Tsolakidis_at_day3.com.au>
Date: Fri, 24 Apr 2009 10:13:20 +1000

Hi all,

I have a machine running multiple instances of squid, it's happily
humming along.
Debian package.

One instance uses the standard startup script, with pretty much the
default conf.

The 2nd I start using
squid -f /etc/squid/squid2.conf

The squid2.conf file references different:
http_port 3129 transparent
cache_log /var/log/squid2/cache.log
cache_store_log /var/log/squid2/store.log
access_log /var/log/squid2/access.log squid
pid_filename /var/run/squid2.pid
cache_dir ufs /var/spool/squid2 20000 16 256

I have also multiple logrotate files.

1st instance:

cat /etc/logrotate.d/squid
#
# Logrotate fragment for squid.
#
/var/log/squid/*.log {
        daily
        compress
        delaycompress
        rotate 90
        missingok
        nocreate
        sharedscripts
        postrotate
                test ! -e /var/run/squid.pid || /usr/sbin/squid -k
rotate
        endscript
}

2nd instance:

cat /etc/logrotate.d/squid2
#
# Logrotate fragment for squid2.
#
/var/log/squid2/*.log {
        daily
        compress
        delaycompress
        rotate 90
        missingok
        nocreate
        sharedscripts
        postrotate
                test ! -e /var/run/squid2.pid || /usr/sbin/squid -k
rotate
        endscript
}

However, no go.
The 1st instance is quite happy.
The 2nd however has it's logfiles rotated, but squid does not write to
them, so every morning I have to restart squid manually.

Has anyone been able to get squid -k rotate working with multiple
instances ?
If so, how ?
Or is there another way to do this ?

Thanks for your time :)

Regards,
Ross

DISCLAIMER:
This e-mail and any files transmitted with it may be privileged and confidential, and are intended only for the use of the intended recipient. If you are not the intended recipient or responsible for delivering this e-mail to the intended recipient, any use, dissemination, forwarding, printing or copying of this e-mail and any attachments is strictly prohibited.
If you have received this e-mail in error, please REPLY TO the SENDER to advise the error AND then DELETE the e-mail from your system.
Any views expressed in this e-mail and any files transmitted with it are those of the individual sender, except where the sender specifically states them to be the views of our organisation.
Our organisation does not represent or warrant that the attached files are free from computer viruses or other defects.
24/4/2009
The user assumes all responsibility for any loss or damage resulting directly or indirectly from the use of the attached files. In any event, the liability to our organisation is limited to either the resupply of the attached files or the cost of having the attached files resupplied.
Received on Fri Apr 24 2009 - 00:13:32 MDT

This archive was generated by hypermail 2.2.0 : Fri Apr 24 2009 - 12:00:03 MDT