#!/usr/bin/env sh

set -e

echo "Updating GeoIP database."

tmpfile=$(mktemp)

curl -o $tmpfile http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz

gzcat $tmpfile > $(dirname $0)/MMDB/GeoLite2-Country.mmdb

echo "Updated GeoIP database."




#!/usr/bin/env sh

set -e

echo "Updating GeoIP database."

tmpfile=$(mktemp)
tmpdir=$(mktemp -d)

curl -o $tmpfile http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz

tar -xzf $tmpfile -C $tmpdir

find $tmpdir -type f -exec mv {} $tmpdir \;

mv $tmpdir/GeoLite2-Country.mmdb $(dirname $0)/MMDB/

echo "Updated GeoIP database."




Fix that the database archive is not extracted correctly
Fix that the database archive is not extracted correctly
