Subject: Writing rc.d scripts
To: None <netbsd-users@netbsd.org>
From: Todd Gruhn's account <tgruhn2@mail.com>
List: netbsd-users
Date: 08/18/2001 11:38:38
I too am interested in writing rc.d scripts: I wish to write and use 
/etc/rc.d/apache to start and stop httpd (apache of course).
But when I execute ./apache I get:

./apache: WARNING: $httpd is not set properly.

Just what does this mean? I don't have an $httpd var, just $name
here is my code:

gandalf# more ./apache
#!/bin/sh
#
# $NetBSD: ipmon,v 1.2.4.1 2000/10/02 01:07:17 lukem Exp $
#

# PROVIDE: httpd
# REQUIRE: DAEMON

. /etc/rc.subr

name="httpd"
rcvar=$name
command="/usr/local/bin/${name}"
   #/usr/sbin/${name}"
pidfile="/var/run/${name}.pid"
command_args="-d /etc/http -f /etc/http/conf/httpd.conf &"
# was command_args="&"

load_rc_config $name
run_rc_command "$1"

-- 
Indeed in nothing is the power of the Dark Lord more clearly shown than in the
estrangement that divides all those who still oppose him. --Lord of the Rings