]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
geoip: update download script for DBIP database
authorPhilip Prindeville <philipp@redfish-solutions.com>
Mon, 20 Apr 2020 00:11:47 +0000 (02:11 +0200)
committerJan Engelhardt <jengelh@inai.de>
Tue, 21 Apr 2020 10:00:50 +0000 (12:00 +0200)
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
geoip/xt_geoip_dl

index 1de60442a8040f55d775d134d7a8ea707582d71e..91aa95b650a968fb8cd989ac5b08ec890a45f008 100755 (executable)
@@ -1,7 +1,11 @@
 #!/bin/sh
 
-rm -rf GeoLite2-Country-CSV_*
+timestamp=$(date "+%Y-%m")
 
-wget -q http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
-unzip -q GeoLite2-Country-CSV.zip
-rm -f GeoLite2-Country-CSV.zip
+wget -q "https://download.db-ip.com/free/dbip-country-lite-${timestamp}.csv.gz"
+
+zcat dbip-country-lite-${timestamp}.csv.gz > dbip-country-lite.csv
+
+rm -f dbip-country-lite-${timestamp}.csv.gz
+
+exit 0