Diferenças entre edições de "UBUNTU manage services"

De Wiki do Bernardino
Ir para: navegação, pesquisa
(Criou nova página com '==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 ...')
 
(Disable service)
Linha 15: Linha 15:
 
  $ sudo -s
 
  $ sudo -s
 
  # echo "manual" > /etc/init/mysql.override
 
  # echo "manual" > /etc/init/mysql.override
 +
 +
 +
==Enable service==
 +
Enable a service to autostart
 +
 +
===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===
 +
 +
If you put the MySQL service into manual mode and want enable again you can simply do
 +
 +
sudo rm /etc/init/mysql.override

Revisão das 12h20min de 15 de setembro de 2016

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

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

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

sudo rm /etc/init/mysql.override