From owner-freebsd-questions Mon Nov 25 22:43:41 2002 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 C897937B401 for ; Mon, 25 Nov 2002 22:43:39 -0800 (PST) Received: from post-20.mail.nl.demon.net (post-20.mail.nl.demon.net [194.159.73.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id D319143EBE for ; Mon, 25 Nov 2002 22:43:38 -0800 (PST) (envelope-from cls@raggedclown.net) Received: from [212.238.197.102] (helo=mailhost.raggedclown.net) by post-20.mail.nl.demon.net with esmtp (Exim 3.36 #1) id 18GZRZ-000Jwz-00 for freebsd-questions@FreeBSD.ORG; Tue, 26 Nov 2002 06:43:37 +0000 Received: from localhost (localhost [127.0.0.1]) by mailhost.raggedclown.net (Ragged Clown Mail Gateway [dawn]) with ESMTP id 09133BB0A for ; Tue, 26 Nov 2002 07:43:37 +0100 (CET) Received: from willow.raggedclown.net (willow.raggedclown.intra [192.168.1.10]) by mailhost.raggedclown.net (Ragged Clown Mail Gateway [dawn]) with ESMTP id 6A97A1854 for ; Tue, 26 Nov 2002 07:43:25 +0100 (CET) Received: by willow.raggedclown.net (Ragged Clown Host [willow], from userid 1009) id 9373322596; Tue, 26 Nov 2002 07:43:25 +0100 (CET) Date: Tue, 26 Nov 2002 07:43:25 +0100 From: Cliff Sarginson To: freebsd-questions Subject: Re: starting, stopping, and reloading services Message-ID: <20021126064325.GC899@raggedclown.net> References: <3DE2F27A.9060705@panix.com> <20021126050004.GC67083@adelaide.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021126050004.GC67083@adelaide.edu.au> User-Agent: Mutt/1.5.1i X-Virus-Scanned: by AMaViS 0.3.12pre8 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, Nov 26, 2002 at 03:30:04PM +1030, Tim Peters wrote: > On Mon, Nov 25, 2002 at 11:12:21PM -0500, nuk wrote: > > hmmm... well, cancel most of that; I found it in the hand book. Except > > the part: Isn't there an easier way? Or is there a good reason for doing > > it like this, or a reason *not* to write a local script to > > start/stop/whatever based on the arguments passed to it? > > Well, installed ports usually do have such a script. You do stuff > like: sh /usr/local/etc/rc.d/service.sh (start|stop). > > As for stuff in the base system, it's already fairly easy. In > general, you stop them by killing the process, and start them by > typing their name, possibly with some arguments that can be > determined by inspecting rc.conf or defaults/rc.conf. If in doubt, > check the /etc/rc* scripts for how they do it. > > As an aside, I suspect the reason base system services don't have > the scripts you want is because in reality, you don't start or stop > base system services very often. > Having said that it would not involve rocket-science to write your own wrappers around the services along the the lines of the rc... files SuSE uses. Maybe if it was done properly you could submit it to SuSE, since their rc.. scripts don't work properly when run as cron jobs...they obviously never tested them for this (one of my network machines run SuSE so I speak from experience). The famous $PATH problem in Cron... -- Regards Cliff Sarginson The Netherlands [ This mail has been checked as virus-free ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message