Find the answer to your Linux question:
Results 1 to 5 of 5
hi, if i want the daemon to start automatically (without fail) whenever the system boots up, what changes do i need to make to your skeleton code? and also, if ...
  1. #1
    Just Joined!
    Join Date
    Nov 2008
    Posts
    11

    Starting a daemon automatically?

    hi, if i want the daemon to start automatically (without fail) whenever the system boots up, what changes do i need to make to your skeleton code? and also, if my daemon is written in perl or python, can i start it automatically? thanks!

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    955
    Most varieties of Linux use the System V setup for initialising the system. You put your daemon start/stop script in /etc/init.d or /etc/rc.d/init.d (the exact location varies) and symbolic links to it in the startup directories for the levels you want it to run at. So if you want the daemon to run at levels 2 and upwards, put links into rc2.d, rc3.d and so forth.

    If you have a look at these directories, you'll see what the link files need to be called and what typical startup scripts look like.

    Have fun!
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Just Joined!
    Join Date
    Nov 2008
    Posts
    2
    You could edit your boot levels!

  4. #4
    Just Joined!
    Join Date
    Nov 2008
    Posts
    2
    Oh wait nvm. I did not read the rest of hazle's post lol that is correct though. I have wasted internet, how shall I punish myself?

  5. #5
    Just Joined!
    Join Date
    Apr 2005
    Location
    Bolton, Lancashire, UK
    Posts
    3

    Starting a daemon automatically

    For perl scripts as a daemon, please see the way I did it in: "Adding an Automatic Dynamic DNS Update Daemon to Fedora-9". Jim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...