Subject: Re: rc.d Qn
To: Jeremy C. Reed <reed@reedmedia.net>
From: Ron Roskens <roskens@elfin.net>
List: netbsd-users
Date: 04/10/2002 14:30:08
One of the cool features added recently, was the addition of a "$procname"
variable. With this you can have your main script as the $command and
$procame can be the final process name. Very useful when starting
processes via scripts. One additional benefit of this is that you can
still specify a user to run the script as. If you overwrite the *_start
and *_stop functions, it negates this functionality.

The default for stopping is kill -TERM.

On Wed, 10 Apr 2002, Jeremy C. Reed wrote:

> Date: Wed, 10 Apr 2002 11:30:15 -0700 (PDT)
> From: Jeremy C. Reed <reed@reedmedia.net>
> To: rob <rob_mail@fastmail.fm>
> Cc: netbsd-users@netbsd.org
> Subject: Re: rc.d Qn
>
> On Thu, 11 Apr 2002, rob wrote:
>
> > When rolling scripts for rc.d you can specify a command that is executed
> > when /etc/rc.d/script start is executed.
> > I presume that a kill -QUIT is used when a /etc/rc.d/script stop is
> > executed?
>
> Have a look at /etc/rc.subr -- it is documented in there. (Search for
> "stop".)
>
> > Anyway to get to the point I have a number of services that use separate
> > scripts for starting up, shutting down and restarting e.g. startup.sh &
> > shutdown.sh how can I modify my custom /etc/rc.d/scriptxyz to execute
> > the appropriate script for start, stop, restart etc..?
>
> Look at the many examples in /etc/rc.d/.
>
>  grep stop_cmd /etc/rc.d/*
>
> Good luck,
>
>    Jeremy C. Reed
>    http://www.reedmedia.net/
>
>
>

Elfin