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,15 +261,13 @@ 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"; $AddFirewallRule = $TRUE;
$AddFirewallRule = $TRUE; } else {
} else { $InstallerArguments += "-AddFirewallRule 0";
$InstallerArguments += "-AddFirewallRule 0"; $AddFirewallRule = $FALSE;
$AddFirewallRule = $FALSE;
}
} }
} }