[clug] Starting services in ubuntu

paul at pabryan.mine.nu paul at pabryan.mine.nu
Wed May 11 01:35:19 GMT 2005

On Wed, May 11, 2005 at 10:08:54AM +1000, David Gibson wrote:
> And like Debian, from which it is derived, it has the update-rc.d
> command which theoretically does something similar to chkconfig.
> However, it's really designed for use from package scripts, not by the
> user, and I, for one, have never figured out how to drive it usefully.

It's pretty straight forward. The man page will tell you all about

To create the default setup, do a:

$ update-rc.d apache2 defaults 

Where update-rc.d differs from chkconfig however is due to it being,
as you say, for package scripts. If links already exist, it won't
overwrite them. So, it's really only for creating the links
initially. This is a Debian policy thing. The assumption is that, if
the links exist, the sys admin did it and the package scripts should
respect that.

If you want to change the links, you need to remove them first. Issue a:

$ update-rc.d -f apache2 remove

The -f is needed if /etc/init.d/apache2 stills exists, which I assume
it does otherwise we wouldn't be having this conversation.

Then you can do as the above. Remember, this is only if you want to
change the existing set of links. If all you want to do is create them
initially, you don't need to do the remove.


More information about the linux mailing list