*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi all , I would like to know how to make a deamon start at boot time with freeBSD . In linux ( redhat ) I have the chkconfig command and I'll be very happy if there something similar it in freeBSD
If /etc/rc supports the daemon directly, you would just edit your /etc/rc.conf.local to start the daemon (see /etc/rc.conf for an idea on the syntax etc.). If it's not supported by /etc/rc, the easiest thing to do is add the startup command to /etc/rc.local.
thank for your words , but I could not findout the :
Quote:
supports the daemon directly
and
Quote:
If it's not supported by /etc/rc, the easiest thing to do is add the startup command to /etc/rc.local.
could you give me more detail for that ?
I used linux for several month , and I knew that adding the command to /etc/rc.local make it run at boot time , but that way is not so good when a command is a deamon shell file .
I install httpd from port ( the freeBSD version is 5.4 ) , how should I do ?
Did you read the handbook entry on Apache? It gives you exact directions for starting Apache on boot (and it seems like it is supported by /etc/rc.conf.
I would like to know that file /ect/rc.conf how could it find out the script starting the deamon ?
I found some in /etc/rc.d ( sshd , sendmail ) and /usr/local/sbin ( as apachectl )
As in linux , all the script put in the /etc/init.d , and with the freeBSD I found it do not similar ( maybe the script in /etc/rc.d or /usr/local/sbin as abouve) .
You control /etc/rc.conf by changing around the entries in it (read the comments, they're quite good). Basically, when BSD boots init runs the /etc/rc script which parses rc.conf and rc.conf.local and starts programs based on the settings therein. I suggest you check out this section of the handbook (in fact you really ought to sit down and read the whole handbook and the rc(8) man page since the BSDs don't have runlevels per se the way Linux systems do.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.