mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-23 15:50:19 +00:00
firewall-cmd --state
returns 0 on 'running' non 0 on 'not running',
so check retval and not text returned. FirewallD conversion to multicall IPTables test
This commit is contained in:
parent
4bb71ae046
commit
b16f797317
2 changed files with 28 additions and 22 deletions
|
@ -879,7 +879,7 @@ create_pihole_user() {
|
|||
|
||||
configureFirewall() {
|
||||
# Allow HTTP and DNS traffic
|
||||
if [[ $(firewall-cmd --state) == "running" ]]; then
|
||||
if firewall-cmd --state &> /dev/null; then
|
||||
whiptail --title "Firewall in use" --yesno "We have detected a running firewall\n\nPi-hole currently requires HTTP and DNS port access.\n\n\n\nInstall Pi-hole default firewall rules?" ${r} ${c} || \
|
||||
{ echo -e ":::\n::: Not installing firewall rulesets."; return 1; }
|
||||
echo -e ":::\n:::\n Configuring FirewallD for httpd and dnsmasq."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue