mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Merge pull request #452 from Icinga:fix/unhandled_true_in_output_during_installation
Fix: Unhandled true output during installation Fixes unhandled `true` output on the console while running the installer
This commit is contained in:
commit
e3e330f5d3
4 changed files with 7 additions and 6 deletions
|
|
@ -34,6 +34,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
||||||
* [#446](https://github.com/Icinga/icinga-powershell-framework/pull/446) Fixes Icinga for Windows progress preference, which sometimes caused UI glitches
|
* [#446](https://github.com/Icinga/icinga-powershell-framework/pull/446) Fixes Icinga for Windows progress preference, which sometimes caused UI glitches
|
||||||
* [#449](https://github.com/Icinga/icinga-powershell-framework/pull/449) Fixes unhandled exception while importing modules during `Install-IcingaComponent` process, because of possible missing dependencies
|
* [#449](https://github.com/Icinga/icinga-powershell-framework/pull/449) Fixes unhandled exception while importing modules during `Install-IcingaComponent` process, because of possible missing dependencies
|
||||||
* [#451](https://github.com/Icinga/icinga-powershell-framework/pull/451) Fixes PowerShell being unable to enter JEA context if only the Framework is installed and removes the `|` from plugin output, in case a JEA error is thrown that check commands are not present
|
* [#451](https://github.com/Icinga/icinga-powershell-framework/pull/451) Fixes PowerShell being unable to enter JEA context if only the Framework is installed and removes the `|` from plugin output, in case a JEA error is thrown that check commands are not present
|
||||||
|
* [#452](https://github.com/Icinga/icinga-powershell-framework/pull/452) Fixes unhandled `true` output on the console while running the installer
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ function Repair-IcingaService()
|
||||||
$ServiceUser = $ConfigUser;
|
$ServiceUser = $ConfigUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
Set-IcingaServiceUser -User $ServiceUser -SetPermission;
|
Set-IcingaServiceUser -User $ServiceUser -SetPermission | Out-Null;
|
||||||
Update-IcingaServiceUser;
|
Update-IcingaServiceUser;
|
||||||
|
|
||||||
Write-IcingaConsoleNotice -Message 'Icinga Agent service was successfully repaired. You can start it now with "Start-Service icinga2"';
|
Write-IcingaConsoleNotice -Message 'Icinga Agent service was successfully repaired. You can start it now with "Start-Service icinga2"';
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,12 @@ function Set-IcingaServiceUser()
|
||||||
);
|
);
|
||||||
|
|
||||||
if ([string]::IsNullOrEmpty($User)) {
|
if ([string]::IsNullOrEmpty($User)) {
|
||||||
throw 'Please specify a username to modify the service user';
|
Write-IcingaConsoleError -Message 'Please specify a username to modify the service user';
|
||||||
return $FALSE;
|
return $FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($null -eq (Get-Service $Service -ErrorAction SilentlyContinue)) {
|
if ($null -eq (Get-Service $Service -ErrorAction SilentlyContinue)) {
|
||||||
return;
|
return $FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($User.Contains('\') -eq $FALSE) {
|
if ($User.Contains('\') -eq $FALSE) {
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ function Install-IcingaComponent()
|
||||||
[void](Remove-ItemSecure -Path $entry.FullName -Recurse -Force);
|
[void](Remove-ItemSecure -Path $entry.FullName -Recurse -Force);
|
||||||
}
|
}
|
||||||
|
|
||||||
[void](Copy-ItemSecure -Path $PackageRoot -Destination $ComponentFolder -Recurse -Force);
|
Copy-ItemSecure -Path $PackageRoot -Destination $ComponentFolder -Recurse -Force | Out-Null;
|
||||||
|
|
||||||
Write-IcingaConsoleNotice 'Installing version "{0}" of component "{1}"' -Objects $ManifestFile.ModuleVersion, $Name.ToLower();
|
Write-IcingaConsoleNotice 'Installing version "{0}" of component "{1}"' -Objects $ManifestFile.ModuleVersion, $Name.ToLower();
|
||||||
|
|
||||||
|
|
@ -269,7 +269,7 @@ function Install-IcingaComponent()
|
||||||
|
|
||||||
Write-IcingaConsoleNotice 'Installing component "service" into "{0}"' -Objects $ServiceDirectory;
|
Write-IcingaConsoleNotice 'Installing component "service" into "{0}"' -Objects $ServiceDirectory;
|
||||||
|
|
||||||
Copy-ItemSecure -Path $binary.FullName -Destination $UpdateBin -Force;
|
Copy-ItemSecure -Path $binary.FullName -Destination $UpdateBin -Force | Out-Null;
|
||||||
|
|
||||||
[void](Install-IcingaForWindowsService -Path $ServiceBin -User $ServiceUser -Password (Get-IcingaInternalPowerShellServicePassword));
|
[void](Install-IcingaForWindowsService -Path $ServiceBin -User $ServiceUser -Password (Get-IcingaInternalPowerShellServicePassword));
|
||||||
Update-IcingaServiceUser;
|
Update-IcingaServiceUser;
|
||||||
|
|
@ -373,7 +373,7 @@ function Install-IcingaComponent()
|
||||||
return $FALSE;
|
return $FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Set-IcingaServiceUser -User $ServiceUser -SetPermission;
|
Set-IcingaServiceUser -User $ServiceUser -SetPermission | Out-Null;
|
||||||
Update-IcingaServiceUser;
|
Update-IcingaServiceUser;
|
||||||
|
|
||||||
Write-IcingaConsoleNotice 'Installation of component "agent" with version "{0}" was successful.' -Objects $MSIData.ProductVersion;
|
Write-IcingaConsoleNotice 'Installation of component "agent" with version "{0}" was successful.' -Objects $MSIData.ProductVersion;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue