LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-09-2006, 01:23 PM   #1
jbrearley
LQ Newbie
 
Registered: Apr 2004
Posts: 3

Rep: Reputation: 0
daemon not starting up


I have put my daemon shell code in /etc/rc.d/init.d but it doesnt get started when the PC reboots. What am I missing?

The code runs fine in a terminal, has all the standard stop/start/status/etc command line options. I am running Fedora Core 5.
 
Old 05-09-2006, 04:02 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,204
Blog Entries: 1

Rep: Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059
You should use the "chkconfig" to add the daemon starting script to the desired runlevels. Read
Code:
man chkconfig
for more details.
 
Old 05-11-2006, 10:54 AM   #3
jbrearley
LQ Newbie
 
Registered: Apr 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the pointer to chkconfig. That did the trick. For the benefit of othere, here are more details:

• Daemon start / stop sequence is controlled by utility chkconfig
• Type: man chkconfig
• Not sure where chkconfig stores its data file
• See sample daemons shell scripts in /etc/init.d
• Each daemon script needs to support primary command line options of start, stop, status, restart
• Some daemons support secondary commands line options condrestart, etc
• In order for chkconfig to accept your new daemon, you need the following two comment lines in the script
# chkconfig: - 25 75
# description: whatever your daemon does
• To activate your new daemon, do the following
• Type: cp <daemon_name> /etc/init.d
• Type: chkconfig --add <daemon_name>
• By default, the daemon is setup in the "off" state
• Type: chkconfig --level 0123456 <daemon_name> on
• This turns on the daemon
• Type: chkconfig --list
• Your new daemon should be showing "on" state for all 7 runlevels
• The new daemon will get started automatically on the next reboot
• If you don't want to reboot now, you can type: <daemon_name> start
• Type: <daemon_name> status
 
  


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
still cant get nmb daemon starting eroica Linux - Networking 1 12-02-2004 08:42 PM
Starting daemon at boot up Buto Slackware 2 09-07-2004 08:44 PM
Starting FTP Daemon baunemann Linux - Networking 4 03-14-2004 10:07 AM
Starting Up MySQL daemon tuka Linux - Software 2 08-06-2003 11:45 AM
Starting daemon during boot up chuck77 Linux - General 3 03-27-2002 06:47 AM

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

All times are GMT -5. The time now is 05:56 PM.

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