Merge pull request #481 from Icinga:fix/unhandled_icinga_output

Fixes unhandled Icinga output
This commit is contained in:
Lord Hepipud 2022-02-15 16:02:35 +01:00 committed by GitHub
commit 404cdc1973
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -112,7 +112,7 @@ function Install-IcingaFrameworkComponent()
if ([string]::IsNullOrEmpty((Get-IcingaJEAContext)) -eq $FALSE) { if ([string]::IsNullOrEmpty((Get-IcingaJEAContext)) -eq $FALSE) {
Write-IcingaConsoleNotice 'Updating Icinga JEA profile'; Write-IcingaConsoleNotice 'Updating Icinga JEA profile';
Invoke-IcingaCommand { Install-IcingaJEAProfile; }; Invoke-IcingaCommand -ScriptBlock { Install-IcingaJEAProfile; } | Out-Null;
} }
# Unload the module if it was loaded before # Unload the module if it was loaded before

View file

@ -109,7 +109,7 @@ function Install-IcingaFrameworkUpdate()
if ([string]::IsNullOrEmpty((Get-IcingaJEAContext)) -eq $FALSE) { if ([string]::IsNullOrEmpty((Get-IcingaJEAContext)) -eq $FALSE) {
Remove-IcingaFrameworkDependencyFile; Remove-IcingaFrameworkDependencyFile;
Write-IcingaConsoleNotice 'Updating Icinga JEA profile'; Write-IcingaConsoleNotice 'Updating Icinga JEA profile';
Invoke-IcingaCommand { Install-IcingaJEAProfile; }; Invoke-IcingaCommand -ScriptBlock { Install-IcingaJEAProfile; } | Out-Null;
} }
Write-IcingaConsoleNotice 'Framework update has been completed. Please start a new PowerShell instance now to complete the update'; Write-IcingaConsoleNotice 'Framework update has been completed. Please start a new PowerShell instance now to complete the update';

View file

@ -35,7 +35,7 @@ function Restart-IcingaService()
} catch { } catch {
Write-IcingaConsoleError -Message 'Failed to restart service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message; Write-IcingaConsoleError -Message 'Failed to restart service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message;
} }
} } | Out-Null;
} else { } else {
Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service; Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service;
} }

View file

@ -35,7 +35,7 @@ function Start-IcingaService()
} catch { } catch {
Write-IcingaConsoleError -Message 'Failed to start service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message; Write-IcingaConsoleError -Message 'Failed to start service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message;
} }
} } | Out-Null;
} else { } else {
Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service; Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service;
} }

View file

@ -35,7 +35,7 @@ function Stop-IcingaService()
} catch { } catch {
Write-IcingaConsoleError -Message 'Failed to stop service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message; Write-IcingaConsoleError -Message 'Failed to stop service "{0}". Error: {1}' -Objects $IcingaShellArgs[0], $_.Exception.Message;
} }
} } | Out-Null;
} else { } else {
Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service; Write-IcingaConsoleWarning -Message 'The service "{0}" is not installed' -Objects $Service;
} }