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

Make Update-ServiceBinaries() return True/False.

Refers to #13
parent 6d3919ee
No related branches found
No related tags found
No related merge requests found
...@@ -227,7 +227,8 @@ function Copy-ServiceFiles { ...@@ -227,7 +227,8 @@ function Copy-ServiceFiles {
function Update-ServiceBinaries { function Update-ServiceBinaries {
$MarkerFile = "$($UpdateMarkerPath)\$($env:COMPUTERNAME)" $MarkerFile = "$($UpdateMarkerPath)\$($env:COMPUTERNAME)"
if (Test-Path "$MarkerFile" -Type Leaf) { if (Test-Path "$MarkerFile" -Type Leaf) {
Return Write-Verbose "Found marker ($($MarkerFile)), not updating service."
Return $False
} }
Log-Info "Marker file ($($MarkerFile)) missing, trying to update service." Log-Info "Marker file ($($MarkerFile)) missing, trying to update service."
Stop-MyService Stop-MyService
...@@ -240,6 +241,7 @@ function Update-ServiceBinaries { ...@@ -240,6 +241,7 @@ function Update-ServiceBinaries {
Log-Error "Creating $($MarkerFile) FAILED!`n$($_.Exception.Message)" Log-Error "Creating $($MarkerFile) FAILED!`n$($_.Exception.Message)"
Exit Exit
} }
Return $True
} }
......
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