From 0c5076ad770d6cd714b825a33be9aaef2c2663df Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Mon, 4 Nov 2019 09:42:08 +0100 Subject: [PATCH] Improve question for Firewall to be always printed --- .../misc/Start-IcingaAgentInstallWizard.psm1 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 index 7c00f1d..57915b0 100644 --- a/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 +++ b/lib/core/icingaagent/misc/Start-IcingaAgentInstallWizard.psm1 @@ -261,15 +261,13 @@ function Start-IcingaAgentInstallWizard() $InstallerArguments += ("-AcceptConnections 1"); } - if ($AcceptConnections -eq 0) { - if ($null -eq $AddFirewallRule) { - if ((Get-IcingaAgentInstallerAnswerInput -Prompt ([string]::Format('Do you want to open the Windows Firewall for incoming traffic on Port "{0}"?', $CAPort)) -Default 'y').result -eq 1) { - $InstallerArguments += "-AddFirewallRule 1"; - $AddFirewallRule = $TRUE; - } else { - $InstallerArguments += "-AddFirewallRule 0"; - $AddFirewallRule = $FALSE; - } + if ($null -eq $AddFirewallRule) { + if ((Get-IcingaAgentInstallerAnswerInput -Prompt ([string]::Format('Do you want to open the Windows Firewall for incoming traffic on Port "{0}"?', $CAPort)) -Default 'y').result -eq 1) { + $InstallerArguments += "-AddFirewallRule 1"; + $AddFirewallRule = $TRUE; + } else { + $InstallerArguments += "-AddFirewallRule 0"; + $AddFirewallRule = $FALSE; } }