How can I disable autostart for a service without uninstalling? For example, I'd like to leave tomcat installed, but I don't want it turning on every time I restart.
Asked
Active
Viewed 2.4e+01k times
4 Answers
192
This should do the trick:
Open terminal (Ctrl + Alt + T) and enter the following command:
sudo update-rc.d tomcat disable
Basically update-rc.d will modify existing runlevel links for the script /etc/init.d/tomcat by renaming start links to stop links.
rink.attendant.6
- 123
hhlp
- 42,872
43
More generic and more visual, with a nice UI: sysv-rc-conf
Uncheck the boxes for tomcat7 (runlevels 2 to 5), quit and that's it.
youri
- 870
41
The disable|enable API is not stable and might change in the future. I suggest you use the following command to remove all the symlinks in /etc/rc?.d/:
update-rc.d -f tomcat remove
Anwar
- 77,855
Riceball LEE
- 571
20
For upstart jobs, you need to disable service like this (e.g. mysql):
$ sudo -s
# echo "manual" > /etc/init/mysql.override
# exit
or using this one-liner:
$ echo "manual" | sudo tee /etc/init/mysql.override > /dev/null
Tomofumi
- 539