diff options
author | David Goulet <dgoulet@torproject.org> | 2023-06-01 09:32:11 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2023-06-01 09:32:11 -0400 |
commit | 2697723cf1485a070776a90d210f872770496ae9 (patch) | |
tree | 67b15b34e7b038b44d63a718753577ba2f52fc02 /scripts | |
parent | 7f5355826b91083c5e12fe7fc4013580f27b7771 (diff) | |
download | tor-2697723cf1485a070776a90d210f872770496ae9.tar.gz tor-2697723cf1485a070776a90d210f872770496ae9.zip |
scripts: Use latest geoip database instead of using location
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/maint/geoip/update_geoip.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/maint/geoip/update_geoip.sh b/scripts/maint/geoip/update_geoip.sh index 743683ab62..3e6b016519 100755 --- a/scripts/maint/geoip/update_geoip.sh +++ b/scripts/maint/geoip/update_geoip.sh @@ -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) |