hlstatsx-community-edition icon indicating copy to clipboard operation
hlstatsx-community-edition copied to clipboard

Outdated GeoLite City Wget

Open Pervaded opened this issue 2 years ago • 0 comments

I think this needs to be updated since the link doesnt exist anymore..

The File GeoLite_Import.sh The error in detail is this:

--2022-04-05 01:00:01-- http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity-latest.zip Resolving geolite.maxmind.com (geolite.maxmind.com)... failed: Name or service not known. wget: unable to resolve host address ‘geolite.maxmind.com’


Nothing to change below here.

FILE="GeoLiteCity-latest.zip" rm -f geoLiteCity_Blocks.csv rm -f geoLiteCity_Location.csv rm -f geoLiteCity_Location.csv.temp rm -f $FILE [ -f $FILE ] || wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/$FILE || exit 1 unzip -jo $FILE || exit 1 mv GeoLiteCity-Blocks.csv geoLiteCity_Blocks.csv mv GeoLiteCity-Location.csv geoLiteCity_Location.csv.temp iconv -f ISO-8859-1 -t UTF-8 geoLiteCity_Location.csv.temp > geoLiteCity_Location.csv mysqlimport -C -d --fields-terminated-by=, --fields-enclosed-by=" --ignore-lines=2 --default-character-set=utf8 -L -i -h $DBHOST -u $DBUSER --password=$DBPASS $DBNAME geoLiteCity_Blocks.csv mysqlimport -C -d --fields-terminated-by=, --fields-enclosed-by=" --ignore-lines=2 --default-character-set=utf8 -L -i -h $DBHOST -u $DBUSER --password=$DBPASS $DBNAME geoLiteCity_Location.csv

Cleanup

rm -f geoLiteCity_Blocks.csv rm -f geoLiteCity_Location.csv rm -f geoLiteCity_Location.csv.temp rm -f $FILE

Pervaded avatar Apr 04 '22 23:04 Pervaded