run custom script when newsyslog rotates log file.

Matthew Seaman m.seaman at infracaninophile.co.uk
Sun Apr 18 06:59:03 PDT 2004


On Sun, Apr 18, 2004 at 09:03:11AM -0400, fbsd_user wrote:
> When my firewall log is rotated by newsyslog.conf, I want to run an
> custom script.
> 
> Is there a way to auto launch script when newsyslog.conf log rotate
> event happens?

Not in any simple way.  However you can get newsyslog(1) to send a
signal to the process of your choice when it cycles the log file.
That process can do whatever you want on receipt of the signal.  This
is not beginner-level shell or perl programming, but it's not hugely
difficult either.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040418/5a61b60a/attachment.bin


More information about the freebsd-questions mailing list