From 1a9b115b96c12a62c3a7ba01b3b467e77be6569c Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch> Date: Fri, 15 Dec 2017 11:32:20 +0100 Subject: [PATCH] Fix idle / busy detection from status XML. Refers to #13 --- Updater/Update-Service.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Updater/Update-Service.ps1 b/Updater/Update-Service.ps1 index e4d0946..5a70ec8 100644 --- a/Updater/Update-Service.ps1 +++ b/Updater/Update-Service.ps1 @@ -34,7 +34,8 @@ function ServiceIsBusy { $StatusXml = "$($InstallationPath)\status.xml" try { [xml]$XML = Get-Content $StatusXml -ErrorAction Stop - if ($XML.ServiceStatus.TransferInProgress) { + # careful, we need a string comparison here: + if ($XML.ServiceStatus.TransferInProgress -eq "true") { Return $True } else { Log-Debug "Service is idle, shutdown possible." -- GitLab