From owner-freebsd-questions@FreeBSD.ORG Mon May 17 10:40:21 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 AC15616A4D6 for ; Mon, 17 May 2004 10:40:21 -0700 (PDT) Received: from dyer.circlesquared.com (host217-45-219-83.in-addr.btopenworld.com [217.45.219.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF7F643D2F for ; Mon, 17 May 2004 10:40:09 -0700 (PDT) (envelope-from peter@circlesquared.com) Received: from circlesquared.com (localhost.petanna.net [127.0.0.1]) i4HHis1Q094708; Mon, 17 May 2004 18:44:55 +0100 (BST) (envelope-from peter@circlesquared.com) Message-ID: <40A8FA16.9030401@circlesquared.com> Date: Mon, 17 May 2004 18:44:54 +0100 From: Peter Risdon User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7b) Gecko/20040327 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Nelson References: <200405170951.25763.fcash-ml@sd73.bc.ca> <20040517172712.GJ80376@dan.emsphone.com> In-Reply-To: <20040517172712.GJ80376@dan.emsphone.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Freddie Cash cc: questions@freebsd.org Subject: Re: Manually starting RCng scripts disabled in rc.conf 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: Mon, 17 May 2004 17:40:21 -0000 Dan Nelson wrote: >In the last episode (May 17), Freddie Cash said: > > >>Is it possible to manually run an rcNG-style script with >>app_enable=NO in /etc/rc.conf? >> >>For instance, there are a few services that I don't want running all >>the time on my laptop (like Apache, Squid, DansGuardian) but that I >>need running now and then for development / testing purposes. As >>such, I have apache_enable="NO" in my rc.conf to prevent Apache from >>starting at boot time. However, this also means that I cannot >>manually start Apache when I need it running, unless I use apachectl >>or run the httpd binary directly. And I can't use the RCng script to >>check the status, or restart, or any of the other nice things that >>RCng gives me. It would be much simpler/nicer if I could use the >>rcNG script to do this. >> >>Am I missing something simple, or is it just not possible to do what >>I want? I'd like to use the rc.d scripts to control everything, but >>if I have to enable them all in rc.conf and then manually stop them >>after each boot, I'll most likely end up writing my own non-RCng >>wrapper scripts for each app. :( >> >> > >"forcestart" should do what you want, I think. > > > In similar situations, I change /usr/local/etc/rc.d/whatever.sh to /usr/local/etc/rc.d/whatever.sh.notnow (or any other suffix) so it doesn't start at boot time, then start it up when I want with #/usr/local/etc/rc.d/whatever.sh.notnow start and stop it again in the obvious way. I'd be interested to know what the drawbacks to this approach are. PWR.