From 2e69ece84c05d1b574b1cf0a98b377d4ad766f86 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Mon, 4 Nov 2019 09:45:26 +0100 Subject: [PATCH] Fixes AcceptConnections argument --- lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 index 57915b0..093f02b 100644 --- a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 +++ b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 @@ -252,13 +252,15 @@ function Start-IcingaAgentInstallWizard() if ($null -eq $AcceptConnections) { if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Is this Agent able to connect to its parent node for certificate generation and general communication?' -Default 'y').result -eq 1) { $CanConnectToParent = $TRUE; + $AcceptConnections = 1; $InstallerArguments += ("-AcceptConnections 1"); } else { + $AcceptConnections = 0; $InstallerArguments += ("-AcceptConnections 0"); } } elseif ($AcceptConnections) { $CanConnectToParent = $TRUE; - $InstallerArguments += ("-AcceptConnections 1"); + $InstallerArguments += ("-AcceptConnections $AcceptConnections"); } if ($null -eq $AddFirewallRule) {