From owner-freebsd-questions@FreeBSD.ORG Mon Mar 19 12:44:34 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 DD4E616A400 for ; Mon, 19 Mar 2007 12:44:34 +0000 (UTC) (envelope-from bseklecki@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.freebsd.org (Postfix) with ESMTP id A354913C459 for ; Mon, 19 Mar 2007 12:44:34 +0000 (UTC) (envelope-from bseklecki@collaborativefusion.com) Received: from collaborativefusion.com (mx01.pub.collaborativefusion.com [206.210.89.201]) (TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Mon, 19 Mar 2007 08:44:33 -0400 id 00056476.45FE85B1.0000BE51 Received: from Internal Mail-Server by mx01 (envelope-from bseklecki@collaborativefusion.com) with RC4-MD5 encrypted SMTP; 19 Mar 2007 07:44:22 -0500 From: "Brian A. Seklecki" To: "=?ISO-8859-1?Q?Jos=E9?= Pablo =?ISO-8859-1?Q?Fern=E1ndez?=" In-Reply-To: <200703161922.12086.pablo.fernandez@rs.com.ar> References: <200703161922.12086.pablo.fernandez@rs.com.ar> Content-Type: text/plain; charset=ISO-8859-1 Organization: Collaborative Fusion, Inc. Date: Mon, 19 Mar 2007 08:44:32 -0400 Message-Id: <1174308272.24543.164.camel@soundwave.pgh.priv.collaborativefusion.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit 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: Mon, 19 Mar 2007 12:44:34 -0000 Sounds slightly beyond the mandate of newsyslog(8). Although instead of a path-to-PID, a glob to pass to pkill(8) -HUP ${glob} would be on my NFR list. At that point, logrotate(8) may seem appealing (or a custom solution): postrotate/endscript The lines between postrotate and endscript (both of which must appear on lines by themselves) are executed after the log file is rotated. These directives may only appear inside of a log file definition. See prerotate as well. For all your non-posix-signal-honoring-daemons out there. ~BAS On Fri, 2007-03-16 at 19:22 -0300, 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? > Thank you. -- Brian A. Seklecki Collaborative Fusion, Inc. IMPORTANT: This message contains confidential information and is intended only for the individual named. If the reader of this message is not an intended recipient (or the individual responsible for the delivery of this message to an intended recipient), please be advised that any re-use, dissemination, distribution or copying of this message is prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.