From a440543a3c7bc67938aaadf1bd3e467f33c9f7f2 Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch> Date: Wed, 13 Dec 2017 13:45:05 +0100 Subject: [PATCH] Logging / verbosity changes. --- Updater/Update-Service.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Updater/Update-Service.ps1 b/Updater/Update-Service.ps1 index 55689c0..84784f2 100644 --- a/Updater/Update-Service.ps1 +++ b/Updater/Update-Service.ps1 @@ -70,9 +70,10 @@ function ServiceIsBusy { function Exit-IfDirMissing([string]$DirName, [string]$Desc) { if (Test-Path -PathType Container $DirName) { + Write-Verbose "Verified $($Desc) path: [$($DirName)]" Return } - $msg = "ERROR: can't find / access $($Desc) path: $($DirName)" + $msg = "ERROR: can't find / access $($Desc) path: [$($DirName)]" Send-MailReport -Subject "path or permission error" -Body $msg Exit } @@ -265,9 +266,9 @@ function Copy-ServiceFiles { Write-Host "ERROR: couldn't find package matching '$($Pattern)'!" Exit } + Write-Verbose "Found update source package: $($PkgDir)" Stop-MyService "Trying to update service using package [$($PkgDir)]." - Write-Verbose "Update source package: $($PkgDir)" Copy-Item -Recurse -Force -ErrorAction Stop ` -Path "$($UpdateBinariesPath)\$($PkgDir)\$($ServiceName)\*" ` -Destination "$InstallationPath" -- GitLab