UBUNTU manage services

De Wiki do Bernardino
Revisão em 12h23min de 15 de setembro de 2016 por JPB (Discussão | contribs) (Enable service)
Ir para: navegação, pesquisa

Disable service

Disable autostart for a service without uninstalling

update.rc

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


upstart

For upstart jobs, you need to disable service like this (e.g. mysql):

$ sudo -s
# echo "manual" > /etc/init/mysql.override


Enable service

Enable a service to autostart

update.rc

Create a service with defaults, foobar example

update-rc.d foobar defaults


upstart

If you put the MySQL service into manual mode and want enable again you can simply do

sudo rm /etc/init/mysql.override