how to start something on boot with a freebsd box

xyyz

Diamond Member
Sep 3, 2000
4,331
0
0

i'm assuming it has something to do with /etc/rc and /usr/local/etc/rc/*

the problem is that the files involved seem overly complex. it seems that some heavy scripting was involved.

right now i have a problem with the machine rebooting when i try making keypairs... and i hate manually running smbd -D , nmbd -D and a certain syslogd command.

can someone tell me of a short and sweet way to get certain things started on boot w/o the heavy scripting?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
/etc/rc.local

Its pretty easy to figure out. Just add something along the lines of:

/usr/local/sbin/smbd -D
/usr/local/sbin/nmbd -D

Change the paths accordingly.
 

xyyz

Diamond Member
Sep 3, 2000
4,331
0
0
Originally posted by: TheOmegaCode
You can also start samba from inetd.


in the security docs i've read, it's recommened you don't use the inetd method.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Then how do you reasily restart that daemon, speculating that it doesn't restart on SIGHUP?
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: Nothinman
Then how do you reasily restart that daemon, speculating that it doesn't restart on SIGHUP?

If that is a requirement, then make your own restart script. Can't possibly be that hard. Software distributions often have sample ones you can work from. (and btw.. NetBSD and FreeBSD 5+ have rc.d so they can have central sysv-style stop/start/restart scripts.)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: BingBongWongFooey
Originally posted by: Nothinman
Then how do you reasily restart that daemon, speculating that it doesn't restart on SIGHUP?

If that is a requirement, then make your own restart script. Can't possibly be that hard. Software distributions often have sample ones you can work from. (and btw.. NetBSD and FreeBSD 5+ have rc.d so they can have central sysv-style stop/start/restart scripts.)

I generally write my own restart scripts. I even write some start scripts instead of using rc.local. I put it in that "documentation" category Ive mentioned before.