From owner-freebsd-questions@FreeBSD.ORG Wed Aug 4 09:56:28 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 43F0616A4CE for ; Wed, 4 Aug 2004 09:56:28 +0000 (GMT) Received: from ei.bzerk.org (ei.xs4all.nl [213.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5161A43D46 for ; Wed, 4 Aug 2004 09:56:27 +0000 (GMT) (envelope-from mail25@bzerk.org) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.12.10/8.12.10) with ESMTP id i749wGah041753; Wed, 4 Aug 2004 11:58:16 +0200 (CEST) (envelope-from mail25@bzerk.org) Received: (from bulk@localhost) by ei.bzerk.org (8.12.10/8.12.10/Submit) id i749wGfO041752; Wed, 4 Aug 2004 11:58:16 +0200 (CEST) (envelope-from mail25@bzerk.org) Date: Wed, 4 Aug 2004 11:58:16 +0200 From: Ruben de Groot To: Joshua Tinnin Message-ID: <20040804095816.GA40948@ei.bzerk.org> Mail-Followup-To: Ruben de Groot , Joshua Tinnin , FreeBSD-questions References: <200408032116.17573.krinklyfig@spymac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200408032116.17573.krinklyfig@spymac.com> User-Agent: Mutt/1.4.2.1i cc: FreeBSD-questions Subject: Re: Restarting swatch when log turns over? 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: Wed, 04 Aug 2004 09:56:28 -0000 On Tue, Aug 03, 2004 at 09:16:17PM -0700, Joshua Tinnin typed: > I hope this isn't too OT ... > > How would I restart swatch when a log turns over? As of now, when a log turns > over, swatch continues running but doesn't read the new log. I thought maybe > I could use > > watchfor /newsyslog/ > exec killall -HUP swatch > > in .swatchrc to match the newsyslog string, but when I try the command there > is no process matching swatch (it's running), and I don't know how to > reference the PID in such a situation (and use kill -HUP instead). Or does > swatch need to be restarted in this situation? Or maybe should newsyslog be > told to restart swatch (not sure how to do this)? I've read through the man > pages and searched the mailing list archives, and am not turning up > anything ... You can specify these in newsyslog.conf, see newsyslog(8) : path_to_pid_file This optional field specifies the file name to read to find the daemon process id, or to find a process group id if the U flag was specified. If this field is present, a signal_number is sent the process id contained in this file. If this field is not present, then a SIGHUP signal will be sent to syslogd(8), unless the N flag has been specified. This field must start with "/" in order to be recognized properly. signal_number This optional field specifies the signal number that will be sent to the daemon process (or to all processes in a process group, if the U flag was specified). If this field is not present, then a SIGHUP signal will be sent. gr, Ruben