# script don't run at startup



## fuhdan (Apr 15, 2013)

Hi all,

I have written some startup scripts and put them in the folder /usr/local/etc/rc.d/xxx. When I run the scripts manually, they work fine. But at the startup they don't run. Is there another way to run the scripts at startup?
Thanks for your help.

Cheers Daniel


----------



## johnblue (Apr 15, 2013)

Two things:

1. Did you make the script executable?
`# chmod +x myscript.sh`

2. Did you tell rc.conf about it?

```
myscript_enable="YES"
```


----------



## jalla (Apr 15, 2013)

Do your scripts conform to the rc.d standard? See rcorder(8)() for a start unless you're familiar with it.

In particular, unless your script has a REQUIRE directive it's likely to fail on boot.


----------

