Skip to content
Commit b059933b authored by Apollon Oikonomopoulos's avatar Apollon Oikonomopoulos Committed by Apollon Oikonomopoulos
Browse files

Fix service enable/disable in the Debian service provider

Add two support methods to detect when we're running systemd as PID 1
and whether a service has only an initscript.

Use these to implement the following functionality:

 • Under systemd, use systemctl enable/disable for all services. This
   works correctly for all services, whether they have a systemd unit
   file or not.

 • Under systemd, use systemctl is-enabled to check enable status only
   for services that have a systemd unit file and fall back to
   invoke-rc.d for sysv services.

Also, fix self.instances to augment the list of systemd-enabled services
with the sysv services.

Closes: #775795
parent 0a0bde0d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment