31

I installed an init.d script with this command:

sudo update-rc.d mongodb defaults 98 02

I want to uninstall it, so I'm planning on running:

sudo update-rc.d -f mongodb remove

I'm concerned about the start and stop conditions in the installation command.
Will running the remove cause the start and stop conditions to be removed also?

Are there any implications that I should be aware of?

1 Answers1

24

Will running the remove cause the start and stop conditions to be removed also?

It will remove any instance of your script from the system, meaning, any link in /etc/rc*runlevel*.d to the mongodb script in your /etc/init.d.

Are there any implications that I should be aware of?

If some other script depends of mongodb to start/stop it will fail.

Check the manpage for a complete description.

Braiam
  • 67,791
  • 32
  • 179
  • 269
  • 1
    Hello, I realise it is a bit late to respond to this answer, but I wonder why https://help.ubuntu.com/community/UbuntuBootupHowto says on deactivating init scripts: 'Do not use the update-rc.d command for this purpose! It is only used in package installation scripts, and not designed for this kind of runlevel management.'What the problems with using it like that? – user2520938 Aug 05 '14 at 17:47
  • @user2520938 because they are saying that one should use upstart management instead, but in this case, the user installed a script using sysvinit helpers, so it has to use the sysvinit to remove it. – Braiam Sep 03 '14 at 14:35