From 6ef357084ca494d2fc6a18fda49ece017e700da4 Mon Sep 17 00:00:00 2001 From: Bxio Date: Mon, 23 Jun 2025 15:32:22 +0100 Subject: [PATCH] --- start.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/start.sh b/start.sh index 7019e32..6679214 100644 --- a/start.sh +++ b/start.sh @@ -15,8 +15,8 @@ for country in $COUNTRIES; do url="https://www.ipdeny.com/ipblocks/data/countries/${country}.zone" echo "Tentando baixar lista de IPs para o país: $country" - tmp_file="zone/${country}.zone.tmp" - target_file="zone/${country}.zone" + tmp_file="${country}.zone.tmp" + target_file="${country}.zone" if curl -sSf -o "$tmp_file" "$url"; then echo "Download concluído para $country." @@ -41,7 +41,8 @@ for country in $COUNTRIES; do # Verifica se ipset existe 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 echo "Criando IpSet '$country'." ipset create "$country" hash:net