Sunday, November 18, 2018

Disable autostart for a service without uninstalling on Ubuntu

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.

$ sudo update-rc.d xrdp defaults
insserv: warning: current start runlevel(s) (empty) of script `xrdp' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `xrdp' overrides LSB defaults (0 1 6).
$ sudo update-rc.d xrdp remove
$ sudo update-rc.d xrdp defaults