Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
1  
FreeBSD has daemon(8) utility which provides subset of start-stop-daemon functionality. –  SaveTheRbtz Mar 15 '12 at 14:53

2 Answers 2

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
1  
Also check the handbook about FreeBSD rc scripts: freebsd.org/doc/handbook/configtuning-rcd.html freebsd.org/doc/en_US.ISO8859-1/books/handbook/… –  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

 
discard

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.