From: Philip Prindeville Date: Mon, 10 Jul 2023 04:37:49 +0000 (+0200) Subject: xt_asn: fix download script X-Git-Tag: v3.25~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e46fe93bc97093b9744592bb016ade1209397536;p=thirdparty%2Fxtables-addons.git xt_asn: fix download script If the server ever existed, it's been retired now. Use the download server instead. Signed-off-by: Philip Prindeville --- diff --git a/asn/xt_asn_dl b/asn/xt_asn_dl index 4232036..60bd598 100755 --- a/asn/xt_asn_dl +++ b/asn/xt_asn_dl @@ -1,5 +1,16 @@ #!/bin/sh + +if [ $# -eq 1 ]; then + exec <$1 +elif [ $# -ne 0 ]; then + echo $(basename $0) [ licence_key_file ] 1>&2 + exit 1 +fi + +read licence_key + rm -rf GeoLite2-ASN-CSV_* -wget -q http://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN-CSV.zip + +wget -q -OGeoLite2-ASN-CSV.zip "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN-CSV&license_key=${licence_key}&suffix=zip" unzip -q GeoLite2-ASN-CSV.zip rm -f GeoLite2-ASN-CSV.zip