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

Create folder for host-specific logs automatically.

Only check if the base folder exists.
parent fa6cfbec
No related branches found
No related tags found
No related merge requests found
......@@ -298,11 +298,13 @@ function Update-ServiceBinaries {
function Upload-LogFiles {
$Dest = "$($UploadPathLogs)\$($env:COMPUTERNAME)"
New-Item -Force -Type Directory $Dest
try {
Copy-Item -Force -ErrorAction Stop `
-Path "$($LogPath)\service.log" `
-Destination $UploadPathLogs
Log-Debug "Uploaded logfile to [$($UploadPathLogs)]."
-Destination $Dest
Log-Debug "Uploaded logfile to [$($Dest)]."
}
catch {
Log-Warning "Uploading logfile FAILED!`n$($_.Exception.Message)"
......@@ -418,7 +420,7 @@ $UpdPathConfig = "$($UpdateSourcePath)\Configs\$($env:COMPUTERNAME)"
$UpdPathConfigCommon = "$($UpdateSourcePath)\Configs\_COMMON_"
$UpdPathMarkerFiles = "$($UpdateSourcePath)\Service\UpdateMarkers"
$UpdPathBinaries = "$($UpdateSourcePath)\Service\Binaries"
$UploadPathLogs = "$($UpdateSourcePath)\Logs\$($env:COMPUTERNAME)"
$UploadPathLogs = "$($UpdateSourcePath)\Logs"
Exit-IfDirMissing $InstallationPath "installation"
Exit-IfDirMissing $LogPath "log files"
......
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