geoip: update download script for DBIP database

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This commit is contained in:
Philip Prindeville
2020-04-20 02:11:47 +02:00
committed by Jan Engelhardt
parent 4c68c774c8
commit 4b43df69f5

View File

@@ -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