mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-23 20:03:31 +01:00
scripts: Use latest geoip database instead of using location
Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
parent
7f5355826b
commit
2697723cf1
@ -5,7 +5,15 @@ set -e
|
||||
DIR=$(cd "$(dirname "$0")" && pwd)
|
||||
TMP=$(mktemp -d)
|
||||
|
||||
location --quiet update
|
||||
DB_PATH="/var/lib/location/database.db"
|
||||
|
||||
# In case it exists as a dead symlink.
|
||||
if [ -e "$DB_PATH" ]; then
|
||||
unlink "$DB_PATH"
|
||||
fi
|
||||
|
||||
curl -o "$DB_PATH.xz" "https://location.ipfire.org/databases/1/location.db.xz"
|
||||
xz -d "$DB_PATH.xz"
|
||||
location dump "$TMP/geoip-dump.txt"
|
||||
|
||||
OLDDIR=$(pwd)
|
||||
|
Loading…
Reference in New Issue
Block a user