This file contains 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
#!/bin/sh | |
export GEOIP_EDITION='GeoLite2-Country' | |
export GEOIP_LICENCE_KEY='secret_licence_key' | |
export GEOIP_TMP_FILE=geoip.tar.gz | |
curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=${GEOIP_EDITION}&license_key=${GEOIP_LICENCE_KEY}&suffix=tar.gz" > $GEOIP_TMP_FILE && \ | |
tar -xzf $GEOIP_TMP_FILE --wildcards "*/${GEOIP_EDITION}.mmdb" --strip=1 && \ | |
rm $GEOIP_TMP_FILE |