Improve question for Firewall to be always printed

This commit is contained in:
Lord Hepipud 2019-11-04 09:42:08 +01:00
parent 5da5ab5695
commit 0c5076ad77

View file

@ -261,7 +261,6 @@ function Start-IcingaAgentInstallWizard()
$InstallerArguments += ("-AcceptConnections 1"); $InstallerArguments += ("-AcceptConnections 1");
} }
if ($AcceptConnections -eq 0) {
if ($null -eq $AddFirewallRule) { 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) { 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"; $InstallerArguments += "-AddFirewallRule 1";
@ -271,7 +270,6 @@ function Start-IcingaAgentInstallWizard()
$AddFirewallRule = $FALSE; $AddFirewallRule = $FALSE;
} }
} }
}
if ($EndpointConnections.Count -eq 0 -And $AcceptConnections -eq 1) { if ($EndpointConnections.Count -eq 0 -And $AcceptConnections -eq 1) {
$NetworkDefault = ''; $NetworkDefault = '';