From owner-freebsd-questions@FreeBSD.ORG Mon May 17 10:02:34 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 4661016A4CE for ; Mon, 17 May 2004 10:02:34 -0700 (PDT) Received: from mailtest.sd73.bc.ca (mailtest.sd73.bc.ca [142.24.13.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F67F43D66 for ; Mon, 17 May 2004 10:02:33 -0700 (PDT) (envelope-from fcash-ml@sd73.bc.ca) Received: from localhost (localhost [127.0.0.1]) by mailtest.sd73.bc.ca (Postfix) with ESMTP id 93A2C7333B; Mon, 17 May 2004 10:02:33 -0700 (PDT) Received: from mailtest.sd73.bc.ca ([127.0.0.1]) by localhost (mailtest.sd73.bc.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 69047-02; Mon, 17 May 2004 10:02:33 -0700 (PDT) Received: from [192.168.0.166] (unknown [192.168.0.166]) by mailtest.sd73.bc.ca (Postfix) with ESMTP id 4A54273331; Mon, 17 May 2004 10:02:33 -0700 (PDT) From: Freddie Cash Organization: School District 73 To: Antoine Jacoutot Date: Mon, 17 May 2004 10:02:25 -0700 User-Agent: KMail/1.6.2 References: <200405170951.25763.fcash-ml@sd73.bc.ca> <200405171856.58454.ajacoutot@lphp.org> In-Reply-To: <200405171856.58454.ajacoutot@lphp.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405171002.25712.fcash-ml@sd73.bc.ca> X-Virus-Scanned: by amavisd-new at sd73.bc.ca cc: freebsd-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 Reply-To: fcash-ml@sd73.bc.ca List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2004 17:02:34 -0000 On May 17, 2004 09:56 am, Antoine Jacoutot wrote: > On Monday 17 May 2004 18:51, Freddie Cash wrote: > > 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. :( > What you could do is comment "apache_enable=yes" in rc.conf when > you're not using it. > Then if you need to start apache later on, just uncomment the line > then do a /usr/local/etc/rc.d/apache start That's the same as I'm doing now, although I'm manually editing rc.conf to change NO to YES and back again using sed. It's still an extra step that seems unnecessary. Perhaps there needs to be an app_enable_boot="YES" kind of knob for rc.conf that would start (or not) the app at boot time, but that wouldn't prevent you from manually starting the app using the rc.d script. [shrug] -- Freddie Cash fcash-ml@sd73.bc.ca