From owner-freebsd-questions@FreeBSD.ORG Mon Nov 21 18:08:22 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 CF8FE16A420 for ; Mon, 21 Nov 2005 18:08:22 +0000 (GMT) (envelope-from lists@interpool.ca) Received: from simmts5-srv.bellnexxia.net (simmts5.bellnexxia.net [206.47.199.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 792B543D53 for ; Mon, 21 Nov 2005 18:08:19 +0000 (GMT) (envelope-from lists@interpool.ca) Received: from interpool.homeunix.com ([69.156.21.65]) by simmts5-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with SMTP id <20051121180818.UIPB11606.simmts5-srv.bellnexxia.net@interpool.homeunix.com>; Mon, 21 Nov 2005 13:08:18 -0500 Date: Mon, 21 Nov 2005 13:08:19 -0500 From: Gerry Freymann To: "Michael P. Soulier" Message-Id: <20051121130819.0be55b9a.lists@interpool.ca> In-Reply-To: References: <000001c5eb7d$240a47a0$d1c88a45@picklepie> <20051117091909.00812699.lists@interpool.ca> Organization: Interpool Development www.interpool.ca X-Mailer: Sylpheed version 1.0.5 (GTK+ 1.2.10; i386-portbld-freebsd4.11) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: [0] Cc: freebsd-questions@freebsd.org Subject: Re: starting services? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 18:08:23 -0000 On Mon, 21 Nov 2005 11:32:29 -0500 "Michael P. Soulier" wrote: >On 11/17/05, Gerry Freymann wrote: >> If you manually want to do this, you *must* use the full path to the >> script: >> >> /usr/local/etc/rc.d/samba.sh start | stop > >In the rc(8) manpage, it states that .sh scripts are sourced directly. > > 4. Call each script in turn using run_rc_script() (from > rc.subr(8)), > which sets $1 to ``start'', and sources the script in a > subshell. If the script has a .sh suffix then it is sourced > directly into the current shell. > >Why is that? I've found that running apache.sh directly with >start|stop doesn't work. I need to run apachectl. In order to manually call up apache.sh in the /usr/local/etc/rc.d directory, you have to use the full path to the script. If you: cd /usr/local/etc/rc.d ./apache.sh start it should complain and error out. but if you did: /usr/local/etc/rc.d/apache.sh start things should go as planned. That's, at least, if you wanna do it manually (to either stop or start a service that has a shell script in there). -gerry