Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Mar 2007 09:53:18 -0500
From:      Chris Slothouber <chris@hier7.com>
To:        FreeBSD-questions@FreeBSD.org
Subject:   Re: Starting a service on boot
Message-ID:  <45EC2EDE.9090201@hier7.com>
In-Reply-To: <6B865826E860EF42B3A387A03F39539616917F69@EX0004.AllstreamITS.local>
References:  <6B865826E860EF42B3A387A03F39539616917F69@EX0004.AllstreamITS.local>

next in thread | previous in thread | raw e-mail | index | archive | help
I think you need to call it cc.sh
And make sure it's +x

Jean-Philippe Daigle wrote:
> Hello,
> 
> 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
> script below).
> 
> 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
> #!/bin/sh
> #
> # PROVIDE: cc
> # REQUIRE: DAEMON
> 
> . /etc/rc.subr
> 
> name="cc"
> rcvar=`set_rcvar`
> command="/home/<PATH HERE>/cruisecontrol.sh"
> command_args="&"
> cc_user="<BUILD USERNAME HERE>"
> 
> load_rc_config $name
> run_rc_command "$1"
> 
> 
> I can also check if it's enabled:
> (/etc/rc.d)$ ./cc rcvar 
> # cc
> $cc_enable=YES
> 
> I haven't found anything interesting in the system logs from the last
> boot - any ideas why it's not starting up?
> 
> Thanks
> -Jean-Philippe Daigle
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45EC2EDE.9090201>