From owner-freebsd-questions@FreeBSD.ORG Tue Jun 14 17:07:45 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 7796D16A41C for ; Tue, 14 Jun 2005 17:07:45 +0000 (GMT) (envelope-from jmartin37@speakeasy.net) Received: from mail27.sea5.speakeasy.net (mail27.sea5.speakeasy.net [69.17.117.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F41943D1F for ; Tue, 14 Jun 2005 17:07:45 +0000 (GMT) (envelope-from jmartin37@speakeasy.net) Received: (qmail 812 invoked from network); 14 Jun 2005 17:07:44 -0000 Received: from adsl-211-141-154.asm.bellsouth.net (HELO [192.168.2.101]) (moonlightcheese@[68.211.141.154]) (envelope-sender ) by mail27.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 14 Jun 2005 17:07:44 -0000 Message-ID: <42AF0EDD.4090100@speakeasy.net> Date: Tue, 14 Jun 2005 13:07:41 -0400 From: JM User-Agent: Mozilla Thunderbird 1.0.2-1.3.3 (X11/20050513) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: multipart/mixed; boundary="------------030105010803050907030803" Subject: rcNG script problems 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: Tue, 14 Jun 2005 17:07:45 -0000 This is a multi-part message in MIME format. --------------030105010803050907030803 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit i've written an rcNG script but i'm having some issues. i've read all of the documentation and searched in the mailing lists and didn't find anything about writting custom rcNG scripts. i've built apache2 and PHP5 from source (not from ports) so i had to write my own script to start httpd at boot. i'm having trouble with it and this is my first attempt at an rcNG script. the script name is 'httpd_start' and the perms are 555, owner root group wheel, same as all the other scripts. here is the code: [code] #!/bin/sh # # PROVIDE: httpd_start # REQUIRE: LOGIN httpd_start_enable=${httpd_start_enable-"YES"} httpd_start_flags=${httpd_start_flags-""} . /etc/rc.subr name="httpd_start" rcvar=`set_rcvar` command="/var/www/bin/apachectl" args="start" start_cmd="echo \"Starting Apache\"; ${command} ${args}" stop_cmd="/var/www/bin/apachectl stop" load_rc_config $name run_rc_command="$1" [/code] and here is the entry in rc.conf: [code] httpd_start_enable="YES" [/code] can't figure this one out. is this not the way we're supposed to write rc scripts? this was copied straight from the man pages. i don't understand why it isn't working... --------------030105010803050907030803 Content-Type: message/rfc822; name="rcNG script problems" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rcNG script problems" Message-ID: <42AEF135.6000605@speakeasy.net> Date: Tue, 14 Jun 2005 11:01:09 -0400 From: JM User-Agent: Mozilla Thunderbird 1.0.2-1.3.3 (X11/20050513) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-rc@freebsd.org Subject: rcNG script problems Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit i've written an rcNG script but i'm having some issues. i've read all of the documentation and searched in the mailing lists and didn't find anything about writting custom rcNG scripts. i've built apache2 and PHP5 from source (not from ports) so i had to write my own script to start httpd at boot. i'm having trouble with it and this is my first attempt at an rcNG script. the script name is 'httpd_start' and the perms are 555, owner root group wheel, same as all the other scripts. here is the code: [code] #!/bin/sh # # PROVIDE: httpd_start # REQUIRE: LOGIN httpd_start_enable=${httpd_start_enable-"YES"} httpd_start_flags=${httpd_start_flags-""} . /etc/rc.subr name="httpd_start" rcvar=`set_rcvar` command="/var/www/bin/apachectl" args="start" start_cmd="echo \"Starting Apache\"; ${command} ${args}" stop_cmd="/var/www/bin/apachectl stop" load_rc_config $name run_rc_command="$1" [/code] and here is the entry in rc.conf: [code] httpd_start_enable="YES" [/code] can't figure this one out. is this not the way we're supposed to write rc scripts? this was copied straight from the man pages. i don't understand why it isn't working... --------------030105010803050907030803--