mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #1295 from sharpone74/develop
Small change in upstart.py service module to correctly report a target service start/stop status.
This commit is contained in:
commit
c2c3ef0712
@ -221,9 +221,9 @@ def status(name, sig=None):
|
||||
salt '*' service.status <service name>
|
||||
'''
|
||||
cmd = 'service {0} status'.format(name)
|
||||
if _service_is_sysv(name):
|
||||
return not bool(__salt__['cmd.retcode'](cmd))
|
||||
if _service_is_upstart(name):
|
||||
return 'start/running' in __salt__['cmd.run'](cmd)
|
||||
return not bool(__salt__['cmd.retcode'](cmd))
|
||||
|
||||
|
||||
def _get_service_exec():
|
||||
|
Loading…
Reference in New Issue
Block a user