From c74d9e66f3a14a60b93ed4942ca2e9084b969bcf Mon Sep 17 00:00:00 2001
From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch>
Date: Fri, 9 Mar 2018 13:25:08 +0100
Subject: [PATCH] Homogenize and update path to log file.

---
 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 85e3262..ff1ff49 100644
--- a/Updater/Update-Service.ps1
+++ b/Updater/Update-Service.ps1
@@ -159,7 +159,7 @@ function Start-MyService {
         $ex = $_.Exception.Message
         $msg = "Trying to start the service results in this error:`n$($ex)`n`n"
         $msg += " -------------------- last 50 log lines --------------------`n"
-        $msg += Get-LastLogLines "$($LogPath)\service.log" 50
+        $msg += Get-LastLogLines "$($LogFile)" 50
         $msg += " -------------------- ----------------- --------------------`n"
         Send-MailReport -Subject "Startup of service $($ServiceName) failed!" `
             -Body $msg
@@ -454,7 +454,7 @@ function Upload-LogFiles {
     New-Item -Force -Type Directory $Dest | Out-Null
     try {
         Copy-Item -Force -ErrorAction Stop `
-            -Path "$($LogPath)\AutoTx.log" `
+            -Path "$($LogFile)" `
             -Destination $Dest
         Log-Debug "Uploaded logfile to [$($Dest)]."
     }
@@ -590,6 +590,7 @@ $ServiceRunningBefore = ServiceIsRunning $ServiceName
 
 $ConfigPath = "$($InstallationPath)\conf"
 $LogPath = "$($InstallationPath)"
+$LogFile = "$($LogPath)\AutoTx.log"
 $StatusXml = "$($InstallationPath)\status.xml"
 
 
-- 
GitLab