Files
i2p.i2p/installer/resources/makegeoip.sh
zzz 5c0c69c654 GeoIP: Add MaxMind GeoLite2-Country database 2018113, gzipped
Database and Contents Copyright (c) 2018 MaxMind, Inc.
This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/.
This database incorporates GeoNames [http://www.geonames.org] geographical data,
which is made available under the Creative Commons Attribution 3.0 License.
To view a copy of this license, visit http://www.creativecommons.org/licenses/by/3.0/us/.
- Drop old ipv4 and ipv6 data files and build scripts
- Build changes for new file
2018-11-20 14:25:49 +00:00

15 lines
516 B
Bash
Executable File

#!/bin/sh
#
# Fetch the latest file from Maxmind,
# and pull out what we need
#
rm -rf GeoLite2-Country_20*
mv GeoLite2-Country.tar.gz GeoIPCountry2-Country.tar.gz.bak
mv GeoLite2-Country.mmdb.gz GeoIPCountry2-Country.mmdb.gz.bak
wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz || exit 1
tar xzf GeoLite2-Country.tar.gz || exit 1
mv GeoLite2-Country_20*/GeoLite2-Country.mmdb . || exit 1
gzip GeoLite2-Country.mmdb || exit 1
rm -rf GeoLite2-Country_20*
ls -l GeoLite2-Country.mmdb.gz