Is there a "recommended way" to disable a service in Debian? (Disable = The service is installed but won't start automatically when the machine boots.)
I know that you can update-rc.d -f service remove
(which basically removes the links in rcX.d
), but doing this you lose the sequence number of the service (SXXservice
, with XX being the sequence number), making life harder when you want to re-enable the service. I also know that I can just rename the links in rcX.d
so that they don't start with S
(or move them somewhere else), but I wondered if there is some "Debian-approved best-practice" way to do this.
Have a look at the update-rc.d man page. The third paragraph of the section named Installing Init Script Links reads …
The last two sentences should answer your question. :-)
You can try "sysv-rc-conf" utility to make your life little easier. It is more of chkconfig tool of other system.
Just type at the promp:
sudo apt-get install sysv-rc-conf
Cheers!
Actually,
sysv-rc-conf
is the approach recommended even by update-rc.d man page:As I understood it, the "Debian best practice" is to uninstall the package. You shouldn't have packages installed if you're not using them. This is why Debian packages are all configured to start on installation.
(Those few packages that could be useful to have installed without running usually have a setting in their
/etc/default/<packagename>
configuration files to disable starting.)