-
-
Save fogmoon/16901096bbba04d36e7cf32292893a3e to your computer and use it in GitHub Desktop.
updates GeoLite2 databases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -rf dist/ *.tar.gz GeoLite2-*/ | |
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz | |
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz | |
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz | |
tar -xzvf GeoLite2-City.tar.gz | |
tar -xzvf GeoLite2-Country.tar.gz | |
tar -xzvf GeoLite2-ASN.tar.gz | |
rm *.tar.gz | |
mkdir dist | |
mv */*.mmdb dist/ | |
rm -rf GeoLite2-*/ | |
sudo rm -rf /usr/share/GeoIP/GeoLite2-City.tar.gz /usr/share/GeoIP/GeoLite2-Country.tar.gz /usr/share/GeoIP/GeoLite2-ASN.tar.gz | |
sudo find dist/ -type f -name "*.mmdb" -exec mv {} /usr/share/GeoIP/ \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment