# Custom script won't start from rc.conf



## Beeblebrox (Mar 9, 2013)

The custom script I am working on finally starts from cli through "service ... onestart" but does not start at boot-up, even though /etc/rc.conf has:

```
jenkinsjslave_eable="YES"
```
The script's relevant section is below. I would guess that I have a "REQUIRE" item missing?

```
PROVIDE: jenkinsjslave
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown

. /etc/rc.subr

name=jenkinsjslave
rcvar=jenkinsjslave_enable

load_rc_config "${name}"

: ${jenkinsjslave_enable="NO"}
: ${jenkins_home="/usr/local/jenkins"}
: ${jenkins_war="${jenkins_home}/war/WEB-INF/slave.jar"}
: ${jenkins_java_home="/usr/local/openjdk7"}
: ${jenkins_user="jenkins-builder"}
: ${jenkins_group="jenkins"}
```


----------



## wblock@ (Mar 9, 2013)

Beeblebrox said:
			
		

> The custom script I am working on finally starts from cli through "service ... onestart" but does not start at boot-up, even though /etc/rc.conf has:
> 
> ```
> jenkinsjslave_eable="YES"
> ```



Typo?

#7 here might be relevant: http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html#AEN5900


----------



## Beeblebrox (Mar 9, 2013)

Yes, typo. /etc/rc.conf has: jenkinsjslave_enable="YES"

Script calls java. I copied, then modified a correct script installed by the ports system. I just noticed that original script has "REQUIRE: LOGIN" in it. That means that my script is missing a component somewhere. #7 from the link states:


> make certain command_interpreter is set... Otherwise, this will probably not work properly
> # service name stop


The script starts & stops without any problems when invoked from command-line.


----------

