Date: Mon, 19 Mar 2007 08:44:32 -0400 From: "Brian A. Seklecki" <bseklecki@collaborativefusion.com> To: "=?ISO-8859-1?Q?Jos=E9?= Pablo =?ISO-8859-1?Q?Fern=E1ndez?=" <pablo.fernandez@rs.com.ar> Cc: freebsd-questions@freebsd.org Subject: Re: Logrotating and running a command Message-ID: <1174308272.24543.164.camel@soundwave.pgh.priv.collaborativefusion.com> In-Reply-To: <200703161922.12086.pablo.fernandez@rs.com.ar> References: <200703161922.12086.pablo.fernandez@rs.com.ar>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <bseklecki@collaborativefusion.com> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1174308272.24543.164.camel>