From owner-freebsd-questions@FreeBSD.ORG Mon Nov 1 20:24:30 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 8255C16A4CE for ; Mon, 1 Nov 2004 20:24:30 +0000 (GMT) Received: from wingfoot.org (caduceus.wingfoot.org [64.32.179.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EBFC43D1D for ; Mon, 1 Nov 2004 20:24:30 +0000 (GMT) (envelope-from ges+lists@wingfoot.org) Received: from localhost (localhost.wingfoot.org [127.0.0.1]) by wingfoot.org (Postfix) with ESMTP id 9148F1F446D; Mon, 1 Nov 2004 15:24:29 -0500 (EST) Received: from wingfoot.org ([127.0.0.1]) by localhost (wingfoot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10506-08; Mon, 1 Nov 2004 15:24:28 -0500 (EST) Received: from [IPv6???1] (localhost.wingfoot.org [127.0.0.1]) by wingfoot.org (Postfix) with ESMTP id 0CA761F446C; Mon, 1 Nov 2004 15:24:28 -0500 (EST) Message-ID: <4186A959.3090800@wingfoot.org> Date: Mon, 01 Nov 2004 16:23:37 -0500 From: Glenn Sieb Organization: Wingfoot Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; rv:1.7.3) Gecko/20041023 Thunderbird/0.8 Mnenhy/0.6.0.104 X-Accept-Language: en-us, en MIME-Version: 1.0 To: aaron References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at wingfoot.org cc: freebsd-questions@freebsd.org Subject: Re: starting apche service on start up 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, 01 Nov 2004 20:24:30 -0000 aaron said the following on 11/01/04 15:15: >Using FreeBSD 4.10 release and confused about what to do with the startup script in /usr/local/etc/rc.d/apache.sh when installing the port. The package on another machine works fine b/c it just has options to start and stop in /usr/local/etc/rc.d/apache.sh. > > The newer ports are using an rc subroutine (referenced in the script as rc.subr), which allows for easier enabling/disabling of services via /etc/rc.conf >The port however has a totally different file asking to: > > # Define these apache_* variables in one of these files: > # /etc/rc.conf > # /etc/rc.conf.local > # /etc/rc.conf.d/apache > # > # DO NOT CHANGE THESE DEFAULT VALUES HERE > > apache_enable=${apache_enable-"NO"} > apache_flags=$(apache_flags-""} > apache_pidfile=${apache_pidfile-"/var/run/httpd.pid"} > >I do not have rc.conf. What's the preferred way of starting apache on boot. Why not just do it the same way as the package? > > You really should have an /etc/rc.conf -- have you tried: cat /etc/rc.conf At a command line? All you have to do is add: apache_enable=YES to the end of the file (/etc/rc.conf) and you can then do: /usr/local/etc/rc.d/apache.sh start And that will work. Hope this helps! Best, Glenn