Ver código fonte

Unblocking a domain removes it from hosts file

Bob Mottram 7 anos atrás
pai
commit
92a27e8581
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3
    0
      src/freedombone-utils-firewall

+ 3
- 0
src/freedombone-utils-firewall Ver arquivo

@@ -603,6 +603,9 @@ function firewall_unblock_domain {
603 603
         fi
604 604
         sed -i "/${unblocked_domain}/d" "$FIREWALL_DOMAINS"
605 605
     fi
606
+    if grep -q " $unblocked_domain" /etc/hosts; then
607
+        sed -i "/ $unblocked_domain/d" /etc/hosts
608
+    fi
606 609
 }
607 610
 
608 611
 function firewall_drop_spoofed_packets {