mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add '/y' switch to the net stop and start commands
This commit is contained in:
parent
40b2e3d189
commit
04edea5c59
1 changed files with 2 additions and 2 deletions
|
@ -165,7 +165,7 @@ def start(name):
|
|||
|
||||
salt '*' service.start <service name>
|
||||
'''
|
||||
cmd = ['net', 'start', name]
|
||||
cmd = ['net', 'start', '/y', name]
|
||||
return not __salt__['cmd.retcode'](cmd, python_shell=False)
|
||||
|
||||
|
||||
|
@ -183,7 +183,7 @@ def stop(name):
|
|||
# up if the service takes too long to stop with a misleading
|
||||
# "service could not be stopped" message and RC 0.
|
||||
|
||||
cmd = ['net', 'stop', name]
|
||||
cmd = ['net', 'stop', '/y', name]
|
||||
res = __salt__['cmd.run'](cmd, python_shell=False)
|
||||
if 'service was stopped' in res:
|
||||
return True
|
||||
|
|
Loading…
Add table
Reference in a new issue