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

Move code to check service update marker file into separate function.

Refers to #28, #13
parent 5ea19272
No related branches found
No related tags found
No related merge requests found
......@@ -333,11 +333,11 @@ function Copy-ServiceFiles {
function Update-ServiceBinaries {
$MarkerFile = "$($UpdPathMarkerFiles)\$($env:COMPUTERNAME)"
if (Test-Path "$MarkerFile" -Type Leaf) {
Log-Debug "Found marker [$($MarkerFile)], not updating service."
$NewService = NewServiceBinaries-Available
if (-Not ($NewService)) {
Return $False
}
Stop-TrayApp
Copy-ServiceFiles
try {
......@@ -351,6 +351,16 @@ function Update-ServiceBinaries {
Return $True
}
function NewServiceBinaries-Available {
$MarkerFile = "$($UpdPathMarkerFiles)\$($env:COMPUTERNAME)"
if (Test-Path "$MarkerFile" -Type Leaf) {
Log-Debug "Found marker [$($MarkerFile)], not updating service."
Return $False
}
Write-Verbose "Marker [$($MarkerFile)] missing, service should be updated!"
Return $True
}
function Upload-LogFiles {
$Dest = "$($UploadPathLogs)\$($env:COMPUTERNAME)"
......
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