mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-04 05:04:22 -07:00
Merge branch 'rc.d-systemd' of git://github.com/glensc/ansible into sysd
This commit is contained in:
commit
0b30c74e86
1 changed files with 1 additions and 2 deletions
|
@ -390,7 +390,6 @@ class LinuxService(Service):
|
||||||
break
|
break
|
||||||
|
|
||||||
# Locate a tool for runtime service management (start, stop etc.)
|
# Locate a tool for runtime service management (start, stop etc.)
|
||||||
self.svc_cmd = ''
|
|
||||||
if location.get('service', None) and os.path.exists("/etc/init.d/%s" % self.name):
|
if location.get('service', None) and os.path.exists("/etc/init.d/%s" % self.name):
|
||||||
# SysV init script
|
# SysV init script
|
||||||
self.svc_cmd = location['service']
|
self.svc_cmd = location['service']
|
||||||
|
@ -405,7 +404,7 @@ class LinuxService(Service):
|
||||||
self.svc_initscript = initscript
|
self.svc_initscript = initscript
|
||||||
|
|
||||||
# couldn't find anything yet, assume systemd
|
# couldn't find anything yet, assume systemd
|
||||||
if self.svc_initscript is None:
|
if self.svc_cmd is None and self.svc_initscript is None:
|
||||||
if location.get('systemctl'):
|
if location.get('systemctl'):
|
||||||
self.svc_cmd = location['systemctl']
|
self.svc_cmd = location['systemctl']
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue