Skip to content

Commit

Permalink
different mmdb names
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Hansson <[email protected]>
  • Loading branch information
enoch85 authored Sep 22, 2024
1 parent 6a111c7 commit 7c222dc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,20 @@ download_geoip_mmdb() {
then
docker rm -f maxmind
rm -f /tmp/dockerenv
# Since only one mmdb file can exist at the same time due to Apache "if" confitions, remove IPInfos config
rm -f "$GEOBLOCK_DIR"/IPInfo-Country.mmdb
else
docker rm -f maxmind
rm -f /tmp/dockerenv
print_text_in_color "$ICyan" "Rate limit for Maxmind GeoDatabase reached! We're now trying to get the Country Database from https://ipinfo.io instead."
if ! curl -sfL https://ipinfo.io/data/free/country.mmdb?token="$x8v8GyVQg2UejdPh" -o "$GEOBLOCK_DIR"/GeoLite2-Country.mmdb
if ! curl -sfL https://ipinfo.io/data/free/country.mmdb?token="$x8v8GyVQg2UejdPh" -o "$GEOBLOCK_DIR"/IPInfo-Country.mmdb
then
msg_box "Sorry, we couldn't get the needed IP geolocation database from any source, please try again in 24 hours."
return 1
else
# Since only one mmdb file can exist at the same time due to Apache "if" confitions, remove MaxMinds config
rm -f "$GEOBLOCK_DIR"/GeoLite2-Country.mmdb
return 0
fi
fi
unset x8v8GyVQg2UejdPh
Expand Down

0 comments on commit 7c222dc

Please sign in to comment.