mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fix framework loading instead of cache
This commit is contained in:
parent
2583e82102
commit
62bcbe5553
2 changed files with 5 additions and 49 deletions
|
|
@ -7,52 +7,9 @@
|
||||||
Copyright = '(c) 2021 Icinga GmbH | MIT'
|
Copyright = '(c) 2021 Icinga GmbH | MIT'
|
||||||
Description = 'Icinga for Windows module which allows to entirely monitor the Windows Host system.'
|
Description = 'Icinga for Windows module which allows to entirely monitor the Windows Host system.'
|
||||||
PowerShellVersion = '4.0'
|
PowerShellVersion = '4.0'
|
||||||
NestedModules = @(
|
NestedModules = @( '.\cache\framework_cache.psm1' )
|
||||||
'.\cache\framework_cache.psm1'
|
FunctionsToExport = @( '*' )
|
||||||
)
|
CmdletsToExport = @( '*' )
|
||||||
FunctionsToExport = @(
|
|
||||||
'Use-Icinga',
|
|
||||||
'Invoke-IcingaCommand',
|
|
||||||
'Import-IcingaLib',
|
|
||||||
'Get-IcingaFrameworkCodeCacheFile',
|
|
||||||
'Write-IcingaFrameworkCodeCache',
|
|
||||||
'Publish-IcingaModuleManifest',
|
|
||||||
'Publish-IcingaEventlogDocumentation',
|
|
||||||
'Get-IcingaPluginDir',
|
|
||||||
'Get-IcingaCustomPluginDir',
|
|
||||||
'Get-IcingaCacheDir',
|
|
||||||
'Get-IcingaPowerShellConfigDir',
|
|
||||||
'Get-IcingaFrameworkRootPath',
|
|
||||||
'Get-IcingaForWindowsRootPath',
|
|
||||||
'Get-IcingaPowerShellModuleFile',
|
|
||||||
'Start-IcingaShellAsUser',
|
|
||||||
'Get-IcingaPowerShellConfig',
|
|
||||||
'Read-IcingaPowerShellConfig',
|
|
||||||
'Test-IcingaPowerShellConfigItem',
|
|
||||||
'Write-IcingaConsoleOutput',
|
|
||||||
'Write-IcingaConsoleNotice',
|
|
||||||
'Write-IcingaConsoleWarning',
|
|
||||||
'Read-IcingaFileContent',
|
|
||||||
'Invoke-IcingaInternalServiceCall',
|
|
||||||
'Get-IcingaFrameworkApiChecks',
|
|
||||||
'Get-IcingaBackgroundDaemons',
|
|
||||||
'Enable-IcingaUntrustedCertificateValidation',
|
|
||||||
'Write-IcingaEventMessage',
|
|
||||||
'Exit-IcingaExecutePlugin',
|
|
||||||
'Exit-IcingaPluginNotInstalled',
|
|
||||||
'Exit-IcingaThrowException',
|
|
||||||
'Set-IcingaTLSVersion',
|
|
||||||
'Disable-IcingaProgressPreference',
|
|
||||||
'New-IcingaNewLine',
|
|
||||||
'Write-IcingaConsolePlain',
|
|
||||||
'Test-IcingaFunction',
|
|
||||||
'Write-IcingaConsoleHeader',
|
|
||||||
'Test-IcingaFrameworkConsoleOutput',
|
|
||||||
'ConvertTo-IcingaSecureString',
|
|
||||||
'ConvertTo-JsonUTF8Bytes',
|
|
||||||
'ConvertFrom-JsonUTF8'
|
|
||||||
)
|
|
||||||
CmdletsToExport = @('*')
|
|
||||||
VariablesToExport = '*'
|
VariablesToExport = '*'
|
||||||
AliasesToExport = @( 'icinga' )
|
AliasesToExport = @( 'icinga' )
|
||||||
PrivateData = @{
|
PrivateData = @{
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@ function Use-Icinga()
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($null -ne $Global:Icinga -And $Global:Icinga.ContainsKey('RebuildCache') -And $Global:Icinga.RebuildCache) {
|
if ($null -ne $Global:Icinga -And $Global:Icinga.ContainsKey('RebuildCache') -And $Global:Icinga.RebuildCache) {
|
||||||
Remove-Module 'icinga-powershell-framework';
|
Import-Module 'icinga-powershell-framework' -Global -Force;
|
||||||
Import-Module (Get-IcingaFrameworkCodeCacheFile) -Global -Force;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Disable-IcingaProgressPreference;
|
Disable-IcingaProgressPreference;
|
||||||
|
|
@ -137,7 +136,7 @@ function Import-IcingaLib()
|
||||||
$CacheFile = Get-IcingaFrameworkCodeCacheFile;
|
$CacheFile = Get-IcingaFrameworkCodeCacheFile;
|
||||||
|
|
||||||
if ($Custom -eq $FALSE -And $CompileCache -eq $FALSE -And (Test-Path $CacheFile)) {
|
if ($Custom -eq $FALSE -And $CompileCache -eq $FALSE -And (Test-Path $CacheFile)) {
|
||||||
Import-Module $CacheFile -Global;
|
Import-Module 'icinga-powershell-framework' -Global -Force;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue