2019-10-22 13:53:50 -04:00
|
|
|
function Get-IcingaBackgroundDaemons()
|
|
|
|
|
{
|
2022-08-17 08:52:40 -04:00
|
|
|
$Daemons = Get-IcingaPowerShellConfig -Path 'BackgroundDaemon.EnabledDaemons';
|
|
|
|
|
[hashtable]$Output = @{ };
|
2019-10-22 13:53:50 -04:00
|
|
|
|
|
|
|
|
if ($null -eq $Daemons) {
|
2022-08-17 08:52:40 -04:00
|
|
|
return $Output;
|
2019-10-22 13:53:50 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
foreach ($daemon in $Daemons.PSObject.Properties) {
|
2021-02-16 10:10:00 -05:00
|
|
|
$Arguments = @{ };
|
2019-10-22 13:53:50 -04:00
|
|
|
|
|
|
|
|
foreach ($argument in $daemon.Value.Arguments.PSObject.Properties) {
|
|
|
|
|
$Arguments.Add($argument.Name, $argument.Value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$Output.Add($daemon.Name, $Arguments);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $Output;
|
|
|
|
|
}
|