From owner-freebsd-questions@FreeBSD.ORG Sat Mar 17 19:49:32 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4258C16A402 for ; Sat, 17 Mar 2007 19:49:32 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 9EEF713C459 for ; Sat, 17 Mar 2007 19:49:31 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (dialup204.ach.sch.gr [81.186.70.204]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l2HJmkl3000817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 17 Mar 2007 21:49:00 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id l2HJmTlR071588; Sat, 17 Mar 2007 21:48:32 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id l2HIpTPm054966; Sat, 17 Mar 2007 20:51:29 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 17 Mar 2007 20:51:28 +0200 From: Giorgos Keramidas To: Jos? Pablo Fern?ndez Message-ID: <20070317185128.GB47438@kobe.laptop> References: <200703161922.12086.pablo.fernandez@rs.com.ar> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200703161922.12086.pablo.fernandez@rs.com.ar> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.675, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.52, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: Logrotating and running a command X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2007 19:49:32 -0000 On 2007-03-16 19:22, Jos? Pablo Fern?ndez wrote: > Hello, > I need to rotate some logs, but instead of getting the PID out of a > file and sending a SIGHUP to that process, like newsyslog does, I need > to run a command. > Is that possible with newsyslog? how should I do it? Not directly, but you can easily hack around this by running a daemon which blocks waiting for a signal and runs the command when newsyslog signals your daemon ;-)