Skip to content

Commit

Permalink
Country list should be overwritten not appended
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamm00 committed Jun 3, 2017
1 parent 1d7dddd commit 8ed968b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firewall.sh
Expand Up @@ -9,7 +9,7 @@
# __/ | #
# |___/ #
# #
## - 04/06/2017 - Asus Firewall Addition By Adamm v4.6.4 #
## - 04/06/2017 - Asus Firewall Addition By Adamm v4.6.5 #
## https://github.com/Adamm00/IPSet_ASUS #
#############################################################################################################

Expand Down Expand Up @@ -338,7 +338,7 @@ case $1 in
done
echo "$(wc -l /tmp/countrylist.txt | awk '{print $1}') Entries Collected"
echo "Filtering IPv4 Ranges"
sed -n "s/\r//;/^$/d;/^[0-9,\.,\/]*$/s/^/add BlockedRanges /p" /tmp/countrylist.txt | grep -F "/" | awk '!x[$0]++' >> /jffs/scripts/countrylist.txt
sed -n "s/\r//;/^$/d;/^[0-9,\.,\/]*$/s/^/add BlockedRanges /p" /tmp/countrylist.txt | grep -F "/" | awk '!x[$0]++' > /jffs/scripts/countrylist.txt
echo "Applying Blacklists"
ipset -q -R -! < /jffs/scripts/countrylist.txt
rm -rf /tmp/countrylist*.txt
Expand Down

0 comments on commit 8ed968b

Please sign in to comment.