mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix MacOSX Service Status Check and integration test
This commit is contained in:
parent
eba360870a
commit
74e6ed60ea
2 changed files with 3 additions and 1 deletions
|
@ -421,7 +421,7 @@ def status(name, sig=None, runas=None):
|
|||
for line in output.splitlines():
|
||||
if 'PID' in line:
|
||||
continue
|
||||
if re.search(name, line):
|
||||
if re.search(name, line.split()[-1]):
|
||||
if line.split()[0].isdigit():
|
||||
if pids:
|
||||
pids += '\n'
|
||||
|
|
|
@ -25,6 +25,8 @@ class ServiceModuleTest(ModuleCase):
|
|||
elif os_family == 'Arch':
|
||||
self.service_name = 'systemd-journald'
|
||||
cmd_name = 'systemctl'
|
||||
elif os_family == 'MacOS':
|
||||
self.service_name = 'org.ntp.ntpd'
|
||||
|
||||
if salt.utils.which(cmd_name) is None:
|
||||
self.skipTest('{0} is not installed'.format(cmd_name))
|
||||
|
|
Loading…
Add table
Reference in a new issue