On Sun, Nov 14, 1999 at 04:50:50PM +0100, Oden Eriksson wrote:
> Hi!
> 
> (I'm sorry if this is not the right list...)
> 
> Regarding the cyclog patch by Bruce Guenter.
> 
> I would appreciate a sample of how to use this feature.

What would you like to know? 

The (patched) man file now includes this:

  If arguments after the directory name are present, they are
  interpreted as a command to execute immediately prior to unlinking the
  file.
  The working directory at the time the command is executed is the
  directory named on the command line.
  When executed, the name of the file to be processed is passed as the
  last argument to the command.
  This command must remove the file after its processing is completed.
  It is important not to add more files to the log directory, as
  cyclog will try to repeatedly process them with the command.

Which describes it nicely, I think.

Instead of writiing (at the end of your tcpserver-line...):

| setuser qmaill cyclog /var/log/qmail/smtpd &

You now write:


| setuser qmaill cyclog /var/log/qmail/smtpd logarchive.pl &

where logarchive.pl is a script in your path that does something good
with the file that cyclog meant to remove.

Saving it for the grandchildren in another directory, maybe?

I leave the implementation of logarchive.pl as an exercise to the reader.


Good luck / Lycka till!

/magnus

--
MOST useless 1998 * http://x42.com/

Reply via email to