From 3a3a285d968ce562af629510322aa130671321c1 Mon Sep 17 00:00:00 2001 From: Chris Hoffman Date: Sat, 21 Jun 2014 22:01:02 -0400 Subject: [PATCH] Fixing bug with stopped state --- windows/win_service.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/win_service.ps1 b/windows/win_service.ps1 index bed140e7ffe..70a3aa0005c 100644 --- a/windows/win_service.ps1 +++ b/windows/win_service.ps1 @@ -68,7 +68,7 @@ If ($state) { } Set-Attr $result "changed" $true; } - ElseIf ($state -eq "stopped" -and $svcName -ne "Stopped") { + ElseIf ($state -eq "stopped" -and $svc.Status -ne "Stopped") { try { Stop-Service -Name $svcName -ErrorAction Stop }