Child pages
  • How to disable a service start during boot
Skip to end of metadata
Go to start of metadata

Debian sysv and Ubuntu non-upstart services

On Ubuntu 12.04, upstart boot scripts can be identified by their entries in /etc/init.d being symlinks to /lib/init/upstart-job.

There are several ways to disable a service start during boot.  The ways listed here should result in the service's start during boot remaining disabled when the package containing the service is upgraded.

  • update-rc.d -f <service name> disable
  • for s in /etc/rc*.d/S*<service name>; do mv $s ${s/.d\/S/.d\/K}; done
  • sysv-rc-conf <service name> followed by interactively changing the default symlinks.  sysv-rc-conf is not installed by default.

Ubuntu upstart services

echo manual >> /etc/init/service_name.override

Debian systemd services

systemctl disable service_name.service

Reference

General

http://en.wikipedia.org/wiki/Init

sysv

From Securing Debian Manual section "3.6.1 Disabling daemon services"

Quote:
... the files under /etc/init.d are configuration files and should not get overwritten due to package upgrades if you have made local changes to them

Based on that, any disabling technique that leaves at least one /etc/rc*.d/[KS]* symlink which is different from the symlinks in the upgrade package should be fine.

Upstart

http://upstart.ubuntu.com/cookbook/

systemd

 

  • No labels