update-rc.d

From RaySoft

update-rc.d updates the System V style init script links /etc/rcrunlevel.d/NNname whose target is the script /etc/init.d/name. These links are run by init when it changes runlevels; they are generally used to start and stop system services such as daemons. runlevel is one of the runlevels supported by init, namely, 0123456789S, and NN is the two-digit sequence number that determines where in the sequence init will run the scripts.[1]

Documentation

Syntax

update-rc.d [PARAMETER] name remove
update-rc.d [PARAMETER] name defaults [NN | SS KK]
update-rc.d [PARAMETER] name start|stop NN runlevel [runlevel]... start|stop NN runlevel [runlevel]...

Parameters

-f
Force removal of symlinks even if '/etc/init.d/name' still exists.

Examples

Create symlinks in the default runlevels (2, 3, 4 & 5)
update-rc.d 'apache2' 'defaults'
Remove symlinks in the default runlevels (2, 3, 4 & 5)
update-rc.d -f 'apache2' 'defaults'
Create symlinks in the default runlevels (start 2, 3, 4 & 5, stop 0, 1 & 6)
update-rc.d 'apache2' start 91 2 3 4 5 . stop 91 0 1 6 .

References

  1. man 8 'update-rc.d'