Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Have a line in sh script starting service from rc.d

start-stop-daemon --quiet --start --background --chuid "$USER" --exec /usr/local/bin/env -- $ARGS RETVAL=$?

it returns

/etc/rc.d/spat: start-stop-daemon: not found
/etc/rc.d/spat: --exec: not found

There is no start-stop-daemon ?

share|improve this question
FreeBSD has daemon(8) utility which provides subset of start-stop-daemon functionality. – SaveTheRbtz Mar 15 '12 at 14:53
up vote 3 down vote accepted

No, FreeBSD uses different kind of system. Just open up any other /etc/rc.d script to your favourite text editor and see examples from there.

share|improve this answer
Also check the handbook about FreeBSD rc scripts:… – arved Mar 15 '12 at 12:19
+1 @dima.h There are plenty of FreeBSD experts lurking about Server Fault, so feel free to ask questions if you're having a rough time with the RC scripts. – Chris S Mar 15 '12 at 12:57

Check not only /etc/rc.d where system daemons scripts lives but also /usr/local/etc/rc.d where scripts for additional daemons like mysql or apache and such lives. They are rc shell scripts and, as usual, they have useful hints inside - how to make them startable when system starts, how to setup additional params and many other funny stuff.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.