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