Starting a service on boot
jean.daigle at SolaceSystems.com
Mon Mar 5 14:49:21 UTC 2007
I'm attempting to add a new program to the list of services starting at
boot time on FreeBSD 6.1. Unfortunately, although running the script
directly as root starts it up just fine, it's not starting at boot time.
I've found documentation that says there are two basic steps to follow:
1) Create a script named, say, 'foo' starting the program, place it in
/etc/rc.d/, and make sure it satisfies a few minimal requirements (see
2) Edit rc.conf to add "foo_enable=YES" so the init system knows to
start the new program.
I've done (2), and here's the script for (1) (anything between <> is me
redacting a username, it's obviously not that way in the script):
(/etc/rc.d)$ cat cc
# PROVIDE: cc
# REQUIRE: DAEMON
cc_user="<BUILD USERNAME HERE>"
I can also check if it's enabled:
(/etc/rc.d)$ ./cc rcvar
I haven't found anything interesting in the system logs from the last
boot - any ideas why it's not starting up?
More information about the freebsd-questions