Merge pull request #5167 from jaspernbrouwer/devel
service_module: Fixed false positive on initctl as enable_cmd
This commit is contained in:
commit
6f16ea6d49
1 changed files with 3 additions and 3 deletions
|
@ -431,10 +431,10 @@ class LinuxService(Service):
|
|||
if check_systemd(self.name):
|
||||
# service is managed by systemd
|
||||
self.enable_cmd = location['systemctl']
|
||||
elif os.path.exists("/etc/init/%s.conf" % self.name):
|
||||
elif location['initctl'] and os.path.exists("/etc/init/%s.conf" % self.name):
|
||||
# service is managed by upstart
|
||||
self.enable_cmd = location['initctl']
|
||||
elif os.path.exists("/etc/init.d/%s" % self.name):
|
||||
elif location['update-rc.d'] and os.path.exists("/etc/init.d/%s" % self.name):
|
||||
# service is managed by with SysV init scripts, but with update-rc.d
|
||||
self.enable_cmd = location['update-rc.d']
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue