mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes Remote Sync clears RemoteSource
This commit is contained in:
parent
a4d1971114
commit
5fad73b4e7
1 changed files with 9 additions and 1 deletions
|
|
@ -89,13 +89,21 @@ function Update-IcingaRepository()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Ensure we use the default RemotePath within our IMC config, unless we specify a different path during update
|
||||||
|
[string]$SetRemotePath = $definedRepo.Value.RemotePath;
|
||||||
|
|
||||||
|
if ([string]::IsNullOrEmpty($RemotePath) -eq $FALSE) {
|
||||||
|
Set-IcingaPowerShellConfig -Path ([string]::Format('Framework.Repository.Repositories.{0}.RemotePath', $definedRepo.Name)) -Value $RemotePath;
|
||||||
|
$SetRemotePath = $RemotePath;
|
||||||
|
}
|
||||||
|
|
||||||
Write-IcingaConsoleNotice 'Syncing repository "{0}"' -Objects $definedRepo.Name;
|
Write-IcingaConsoleNotice 'Syncing repository "{0}"' -Objects $definedRepo.Name;
|
||||||
|
|
||||||
if ([string]::IsNullOrEmpty($definedRepo.Value.CloneSource) -eq $FALSE) {
|
if ([string]::IsNullOrEmpty($definedRepo.Value.CloneSource) -eq $FALSE) {
|
||||||
Sync-IcingaRepository `
|
Sync-IcingaRepository `
|
||||||
-Name $definedRepo.Name `
|
-Name $definedRepo.Name `
|
||||||
-Path $definedRepo.Value.LocalPath `
|
-Path $definedRepo.Value.LocalPath `
|
||||||
-RemotePath $definedRepo.Value.RemotePath `
|
-RemotePath $SetRemotePath `
|
||||||
-Source $definedRepo.Value.CloneSource `
|
-Source $definedRepo.Value.CloneSource `
|
||||||
-UseSCP:$definedRepo.Value.UseSCP `
|
-UseSCP:$definedRepo.Value.UseSCP `
|
||||||
-Force `
|
-Force `
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue