mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-23 08:10:16 -05:00
Fixes debug/daemon mode while loading libs only
This commit is contained in:
parent
7a732de5f4
commit
90ef20a7e5
1 changed files with 12 additions and 0 deletions
|
|
@ -53,6 +53,18 @@ function Use-Icinga()
|
||||||
'DebugMode' = $DebugMode;
|
'DebugMode' = $DebugMode;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
# This will fix the debug mode in case we are only using Libs
|
||||||
|
# without any other variable content and daemon handling
|
||||||
|
if ($null -eq $global:IcingaDaemonData) {
|
||||||
|
$global:IcingaDaemonData = [hashtable]::Synchronized(@{});
|
||||||
|
}
|
||||||
|
if ($global:IcingaDaemonData.ContainsKey('DebugMode') -eq $FALSE) {
|
||||||
|
$global:IcingaDaemonData.DebugMode = $DebugMode;
|
||||||
|
}
|
||||||
|
if ($global:IcingaDaemonData.ContainsKey('FrameworkRunningAsDaemon') -eq $FALSE) {
|
||||||
|
$global:IcingaDaemonData.FrameworkRunningAsDaemon = $Daemon;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue