diff --git a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 index 1cd10ae..7cddad4 100644 --- a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 +++ b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 @@ -34,7 +34,9 @@ function Start-IcingaAgentInstallWizard() [bool]$SkipDirectorQuestion = $FALSE, [string]$DirectorUrl, [string]$SelfServiceAPIKey = $null, - $OverrideDirectorVars = $null + $OverrideDirectorVars = $null, + $InstallFrameworkPlugins = $null, + $PluginsUrl = $null ); [array]$InstallerArguments = @(); @@ -363,6 +365,17 @@ function Start-IcingaAgentInstallWizard() } } + if ($null -eq $InstallFrameworkPlugins) { + if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to install the Icinga Plugins?' -Default 'y').result -eq 1) { + $result = Install-IcingaFrameworkPlugins -PluginsUrl $PluginsUrl; + $PluginsUrl = $result.PluginsUrl; + $InstallerArguments += "-InstallFrameworkPlugins 1"; + $InstallerArguments += "-$PluginsUrl '$PluginsUrl'"; + } else { + $InstallerArguments += "-InstallFrameworkPlugins 0"; + } + } + if ($null -eq $InstallFrameworkService) { if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to install the PowerShell Framework as a Service?' -Default 'y').result -eq 1) { $result = Get-IcingaFrameworkServiceBinary;