Skip to content

Thursday, December 3rd, 2009

New Linux User

HOWTO: Make a Script Start in All Runlevels in a Debian System?

September 28, 2005 by Jon  
Filed under How To

Sometimes it’s useful to start a script in all, or at least the most used, runlevels. In a Debian system, do this:

For example purposes, we want to start the script named ‘foo.sh’

  1. As root, type:
    update-rc.d foo.sh defaults

The defaults argument causes foo.sh to start in runlevels 2,3,4,5 and stop in 0,1,6.

To make foo.sh start in runlevels 1,2,3 use the command:

update-rc.d foo.sh start 1 2 3 . stop 0 4 5 6 .

More information can be found on the update-rc.d man page, here.

  • StumbleUpon
  • Digg
  • Facebook
  • Mixx
  • Google
  • TwitThis
  • Reddit
  • Yahoo! Buzz
  • Slashdot
  • E-mail this story to a friend!

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!


About Us | Advertise with us | Blog for EveryJoe | Privacy Policy | Terms of Use
Get This Theme | Sitemap


All content is Copyright © 2005-2009 b5media. All rights reserved.