mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
18 lines
469 B
PowerShell
18 lines
469 B
PowerShell
|
|
function Unregister-IcingaBackgroundDaemon()
|
||
|
|
{
|
||
|
|
param(
|
||
|
|
[string]$BackgroundDaemon,
|
||
|
|
[hashtable]$Arguments
|
||
|
|
);
|
||
|
|
|
||
|
|
if ([string]::IsNullOrEmpty($BackgroundDaemon)) {
|
||
|
|
throw 'Please specify a Cmdlet to remove from running as Background Daemon';
|
||
|
|
}
|
||
|
|
|
||
|
|
$Path = [string]::Format('BackgroundDaemon.EnabledDaemons.{0}', $BackgroundDaemon);
|
||
|
|
|
||
|
|
Remove-IcingaPowerShellConfig -Path $Path;
|
||
|
|
|
||
|
|
Write-Host 'Background daemon has been removed';
|
||
|
|
}
|