From fdcc13d9d76caa8247aa54baa3dd3f35720eebc6 Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Mon, 27 Apr 2020 18:49:51 +0900 Subject: [PATCH] fix: [maxmind] catch 401 not authorized --- install_dependencies.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install_dependencies.sh b/install_dependencies.sh index cb4c956..6569be7 100755 --- a/install_dependencies.sh +++ b/install_dependencies.sh @@ -151,6 +151,10 @@ while [ "$(sha256sum -c GeoLite2-City.tar.gz.sha256 >/dev/null; echo $?)" != "0" echo "Redownloading GeoLite Assets, if this loops, CTRL-C and investigate" wget "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=${MM_LIC}&suffix=tar.gz" -O GeoLite2-City.tar.gz wget "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=${MM_LIC}&suffix=tar.gz.sha256" -O GeoLite2-City.tar.gz.sha256 + if [[ $? == 6 ]]; then + echo "Something is wrong with your License Key, please try entering another one. (You DO NOT need a GeoIP Update key) " + read -p "Please paste your Max Mind License key: " MM_LIC + fi sed -i 's/_.*/.tar.gz/' GeoLite2-City.tar.gz.sha256 sleep 3 done