LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-17-2008, 10:40 PM   #1
iamjayanth
Member
 
Registered: Oct 2008
Posts: 51

Rep: Reputation: 15
How can I automatically start a daemon at boot time.


Hi masters,

I am still learning trades in kernel. I am trying to learn the basic of daemon programming. Can any one tell me how can I start a daemon automatically during boot up. I will be greatfull if anyone post some example code to the above task.
Also what are the other things that you must know when you try daemon programming? Can any one help me?
 
Old 12-17-2008, 10:50 PM   #2
bapigoo9
Member
 
Registered: Aug 2008
Posts: 107

Rep: Reputation: 16
What distro are you using? Many have init scripts and places for you to place your own init scripts. That way you can start your own daemon at boot up.
 
Old 12-17-2008, 11:48 PM   #3
gankoji
Member
 
Registered: Nov 2007
Location: Southern California
Distribution: Slackware-13.0 x86_64, Slackware 12.2, slackware64-current
Posts: 225

Rep: Reputation: 35
simply call the daemon from rc.local (in /etc/rc.d or /etc/init.d)
 
Old 12-18-2008, 12:04 AM   #4
hasanatizaz
Member
 
Registered: Nov 2007
Location: Pakistan
Distribution: Redhat and Debian
Posts: 317
Blog Entries: 1

Rep: Reputation: 35
you can also use ntsysv
 
Old 12-18-2008, 12:29 AM   #5
iamjayanth
Member
 
Registered: Oct 2008
Posts: 51

Original Poster
Rep: Reputation: 15
I am using linux kernel version 2.6.23 on a fedora 8 distribution.

cat /proc/version

Linux version 2.6.23.1-42.fc8 (kojibuilder@xenbuilder4.fedora.phx.redhat.com) (gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)) #1 SMP Tue Oct 30 13:55:12 EDT 2007

Thanks for the quick replays....

I tried google for ntsysv...But whatever I got I didnt understand a bit. What they are meaning by run level....(I hope it is not a childish questine)...again thanks for the quick reply....
 
Old 12-18-2008, 12:55 AM   #6
geekyfacts
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Rep: Reputation: 0
1) Add your daemon startup script to /etc/rc3.d , /etc/init.d
2) Use "chkconfig" and make sure your daemon is "on" for 3 & run levels.

--
geekyfacts
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to enable applications to start automatically at boot time Akhran *BSD 3 07-14-2008 06:32 AM
How to start bash commands automatically every time I start the computer brgsousa Linux - Software 2 10-18-2007 11:26 AM
How to have 'at' daemon start automatically on boot TrulyTessa Linux - Newbie 4 12-13-2004 11:12 AM
automatically start gdm at boot time rosslaird Debian 6 09-07-2004 09:00 AM
How to start scriptfile(tomcat) automatically at boot-time run fmohideen76 Linux - General 4 07-11-2002 10:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:05 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