mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Add function to fetch module root path
This commit is contained in:
parent
abfbac1448
commit
01b4ca1937
2 changed files with 9 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ Description = 'Icinga 2 Windows Agent Module, which allows to entirely monitor t
|
||||||
PowerShellVersion = '3.0'
|
PowerShellVersion = '3.0'
|
||||||
|
|
||||||
# Aus diesem Modul zu exportierende Funktionen. Um optimale Leistung zu erzielen, verwenden Sie keine Platzhalter und löschen den Eintrag nicht. Verwenden Sie ein leeres Array, wenn keine zu exportierenden Funktionen vorhanden sind.
|
# Aus diesem Modul zu exportierende Funktionen. Um optimale Leistung zu erzielen, verwenden Sie keine Platzhalter und löschen den Eintrag nicht. Verwenden Sie ein leeres Array, wenn keine zu exportierenden Funktionen vorhanden sind.
|
||||||
FunctionsToExport = @( 'Use-Icinga', 'Import-IcingaLib', 'Publish-IcingaModuleManifests', 'Get-IcingaPluginDir', 'Get-IcingaCustomPluginDir', 'Get-IcingaCacheDir', 'Get-IcingaPowerShellConfigDir', 'Get-IcingaPowerShellModuleFile' )
|
FunctionsToExport = @( 'Use-Icinga', 'Import-IcingaLib', 'Publish-IcingaModuleManifests', 'Get-IcingaPluginDir', 'Get-IcingaCustomPluginDir', 'Get-IcingaCacheDir', 'Get-IcingaPowerShellConfigDir', 'Get-IcingaFrameworkRootPath', 'Get-IcingaPowerShellModuleFile' )
|
||||||
|
|
||||||
# Aus diesem Modul zu exportierende Cmdlets. Um optimale Leistung zu erzielen, verwenden Sie keine Plat'zhalter und löschen den Eintrag nicht. Verwenden Sie ein leeres Array, wenn keine zu exportierenden Cmdlets vorhanden sind.
|
# Aus diesem Modul zu exportierende Cmdlets. Um optimale Leistung zu erzielen, verwenden Sie keine Plat'zhalter und löschen den Eintrag nicht. Verwenden Sie ein leeres Array, wenn keine zu exportierenden Cmdlets vorhanden sind.
|
||||||
CmdletsToExport = @()
|
CmdletsToExport = @()
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,14 @@ function Get-IcingaPowerShellConfigDir()
|
||||||
return (Join-Path -Path $PSScriptRoot -ChildPath 'config');
|
return (Join-Path -Path $PSScriptRoot -ChildPath 'config');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function Get-IcingaFrameworkRootPath()
|
||||||
|
{
|
||||||
|
[string]$Path = $PSScriptRoot;
|
||||||
|
[int]$Index = $Path.LastIndexOf('\') + 1;
|
||||||
|
$Path = $Path.Substring(0, $Index);
|
||||||
|
return $Path;
|
||||||
|
}
|
||||||
|
|
||||||
function Get-IcingaPowerShellModuleFile()
|
function Get-IcingaPowerShellModuleFile()
|
||||||
{
|
{
|
||||||
return (Join-Path -Path $PSScriptRoot -ChildPath 'icinga-powershell-framework.psm1');
|
return (Join-Path -Path $PSScriptRoot -ChildPath 'icinga-powershell-framework.psm1');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue