From owner-freebsd-questions@FreeBSD.ORG Sun Apr 18 06:59:03 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 499A716A4CE for ; Sun, 18 Apr 2004 06:59:03 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5AC043D2F for ; Sun, 18 Apr 2004 06:59:01 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i3IDwsCK097740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Apr 2004 14:58:54 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i3IDwsxL097739; Sun, 18 Apr 2004 14:58:54 +0100 (BST) (envelope-from matthew) Date: Sun, 18 Apr 2004 14:58:54 +0100 From: Matthew Seaman To: fbsd_user Message-ID: <20040418135854.GA91368@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , fbsd_user , "freebsd-questions@FreeBSD. ORG" References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Virus-Scanned: clamd / ClamAV version devel-20040416, clamav-milter version 0.70g X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: "freebsd-questions@FreeBSD. ORG" Subject: Re: run custom script when newsyslog rotates log file. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2004 13:59:03 -0000 --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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 --=20 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 --zhXaljGHf11kAtnf Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAgomedtESqEQa7a0RAtHjAKCQMeF3njfyZxEIF/uhypJPpx6wJgCeJv/t bYLYfQMuMZTSHKcqG5U8zV0= =9hPk -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf--