LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 06-03-2005, 10:24 PM   #1
kernelvn
Member
 
Registered: Aug 2004
Posts: 91

Rep: Reputation: 15
deamon start at boot freeBSD


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

thank all
 
Old 06-03-2005, 11:38 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
Old 06-03-2005, 11:47 PM   #3
kernelvn
Member
 
Registered: Aug 2004
Posts: 91

Original Poster
Rep: Reputation: 15
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.
 
Old 06-03-2005, 11:51 PM   #4
kernelvn
Member
 
Registered: Aug 2004
Posts: 91

Original Poster
Rep: Reputation: 15
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 ?

thank for reading
 
Old 06-04-2005, 12:01 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
Old 06-04-2005, 12:16 PM   #6
kernelvn
Member
 
Registered: Aug 2004
Posts: 91

Original Poster
Rep: Reputation: 15
Yes !
I did it , thank

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) .

So how could I control the /etc/rc.conf ?



Last edited by kernelvn; 06-04-2005 at 12:56 PM.
 
Old 06-04-2005, 01:17 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem getting X to start with FreeBSD 5.4 voly *BSD 8 07-14-2005 11:06 AM
Trying to start mysql on freebsd 4.8 dedicated server NoS Sr50 *BSD 1 12-07-2004 11:46 PM
make a deamon startup at boot time kernelvn Fedora 4 10-20-2004 06:50 PM
how to start up ssh deamon bennethos Linux - Newbie 2 10-21-2003 08:56 AM
Problems with running a deamon at boot time e0n Linux - Software 9 05-06-2003 07:48 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 09:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration