b5media.com

Advertise with us

Enjoying this blog? Check out the rest of the Technology Channel Subscribe to this Feed

New Linux User

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

by Jon on September 28th, 2005

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.

POSTED IN: How To

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

  • No one has left a comment yet. You know what this means, right? You could be first!

Have an opinion? Leave a comment:




Check Spelling
Activate Spell Check while Typing