Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Nov 2002 07:43:25 +0100
From:      Cliff Sarginson <cls@raggedclown.net>
To:        freebsd-questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: starting, stopping, and reloading services
Message-ID:  <20021126064325.GC899@raggedclown.net>
In-Reply-To: <20021126050004.GC67083@adelaide.edu.au>
References:  <3DE2F27A.9060705@panix.com> <Pine.NEB.4.44.0211252310090.15895-100000@panix2.panix.com> <20021126050004.GC67083@adelaide.edu.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021126064325.GC899>