This commit is contained in:
parent
e4e89c8e28
commit
6ef357084c
7
start.sh
7
start.sh
@ -15,8 +15,8 @@ for country in $COUNTRIES; do
|
|||||||
url="https://www.ipdeny.com/ipblocks/data/countries/${country}.zone"
|
url="https://www.ipdeny.com/ipblocks/data/countries/${country}.zone"
|
||||||
echo "Tentando baixar lista de IPs para o país: $country"
|
echo "Tentando baixar lista de IPs para o país: $country"
|
||||||
|
|
||||||
tmp_file="zone/${country}.zone.tmp"
|
tmp_file="${country}.zone.tmp"
|
||||||
target_file="zone/${country}.zone"
|
target_file="${country}.zone"
|
||||||
|
|
||||||
if curl -sSf -o "$tmp_file" "$url"; then
|
if curl -sSf -o "$tmp_file" "$url"; then
|
||||||
echo "Download concluído para $country."
|
echo "Download concluído para $country."
|
||||||
@ -41,7 +41,8 @@ for country in $COUNTRIES; do
|
|||||||
|
|
||||||
# Verifica se ipset existe
|
# Verifica se ipset existe
|
||||||
if ipset list "$country" > /dev/null 2>&1; then
|
if ipset list "$country" > /dev/null 2>&1; then
|
||||||
echo "IpSet '$country' já existe."
|
echo "IpSet '$country' já existe. Limpando entradas antigas..."
|
||||||
|
ipset flush "$country"
|
||||||
else
|
else
|
||||||
echo "Criando IpSet '$country'."
|
echo "Criando IpSet '$country'."
|
||||||
ipset create "$country" hash:net
|
ipset create "$country" hash:net
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user