Skip to content

Commit

Permalink
Merge pull request #4765 from wazuh/bug/4758-ar-windows
Browse files Browse the repository at this point in the history
Fixed IT control_service Windows loop
  • Loading branch information
davidjiglesias authored Dec 14, 2023
2 parents bdebb05 + ba3e41e commit af7944b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deps/wazuh_testing/wazuh_testing/tools/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ def control_service(action, daemon=None, debug_mode=False):
for _ in range(error_109_windows_retry):
command = subprocess.run(["net", action, "WazuhSvc"], stderr=subprocess.PIPE)
result = command.returncode
if result != 0:
if result == 0:
break
else:
if action == 'stop' and 'The Wazuh service is not started.' in command.stderr.decode():
result = 0
break
Expand Down

0 comments on commit af7944b

Please sign in to comment.