LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How can I automatically start a daemon at boot time. (https://www.linuxquestions.org/questions/linux-software-2/how-can-i-automatically-start-a-daemon-at-boot-time-691372/)

iamjayanth 12-17-2008 10:40 PM

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?

bapigoo9 12-17-2008 10:50 PM

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.

gankoji 12-17-2008 11:48 PM

simply call the daemon from rc.local (in /etc/rc.d or /etc/init.d)

hasanatizaz 12-18-2008 12:04 AM

you can also use ntsysv

iamjayanth 12-18-2008 12:29 AM

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

geekyfacts 12-18-2008 12:55 AM

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


All times are GMT -5. The time now is 02:09 PM.