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...
--- Begin Message ---
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...
--- End Message ---
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"