mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Fixes unhandled Icinga output
This commit is contained in:
parent
7c13c1362d
commit
3a91be6de8
5 changed files with 5 additions and 5 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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';
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue