Adding wget support to fetch scripts

This commit is contained in:
fusion809
2018-07-15 17:43:21 +10:00
committed by Paul Chote
parent 81e1b39bb9
commit e1b1070bcf
4 changed files with 41 additions and 11 deletions

View File

@@ -13,6 +13,10 @@ filename="GeoLite2-Country.mmdb.gz"
if [ ! -e $filename ] || [ -n "$(find . -name $filename -mtime +30 -print)" ]; then
rm -f $filename
echo "Updating GeoIP country database from MaxMind."
curl -s -L -O http://geolite.maxmind.com/download/geoip/database/$filename
if command -v curl >/dev/null 2>&1; then
curl -s -L -O http://geolite.maxmind.com/download/geoip/database/$filename
else
wget -cq http://geolite.maxmind.com/download/geoip/database/$filename
fi
fi