Skip to content
Snippets Groups Projects
Commit d4613fdd authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Logging adjustments in Copy-ServiceFiles().

Refers to #13
parent 8d1d1e2a
No related branches found
No related tags found
No related merge requests found
......@@ -204,23 +204,16 @@ function Update-Configuration {
function Copy-ServiceFiles {
Write-Host -NoNewLine "Updating service binaries: "
try {
Copy-Item -Recurse -Force -ErrorAction Stop `
-Path "$UpdateBinariesPath" `
-Destination "$InstallationPath"
# Copy-FileIfNew "configuration.xml" $ServiceDir
# Copy-FileIfNew "status.xml" $ServiceDir
# Copy-FileIfNew "service.log" $ServiceDir
# Clear-Content "$($ServiceDir)\service.log"
Write-Host "[OK]" -Fore Green
}
catch {
$ex = $_.Exception
Write-Host "[FAILED]" -Fore Red
Write-Host $ex.Message
Log-Error "Updating service binaries FAILED!`n$($_.Exception.Message)"
Exit
}
Log-Info "Updated service binaries!"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment