Re: [squid-users] FIFO + Logrotate squid

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 06 Jun 2008 01:01:22 +1200

William A. Knob wrote:
> Hi all,
>
> I have a problem using FIFO and Squid.
>
> The problem is: I create a log with mkfifo to work with my personal
> mysql logger, works fine. But when Logrotate runs, my fifo disapears!
> Logrotate moves my original FIFO to a .1 FIFO and create an empty FILE
> with the name of my fifo. Anyone knows how I make to logrotate create
> another FIFO when it runs?

   postrotate
   /usr/sbin/squid -k rotate
   endscript

Does whatever shell code you place between them. It's run AFTER the logs
are renumbered. The catch I have usually found with linux is that when
logrotate moves the logfile, its really only a rename. So any programs
with open writing to the file keep sending their stuff to the old .1

What you need in postrotate is something that causes the apps to close
their old file handles and open new ones against the pre-existing new
log file.

Amos

-- 
Please use Squid 2.7.STABLE1 or 3.0.STABLE6
Received on Thu Jun 05 2008 - 13:01:46 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 05 2008 - 12:00:02 MDT