tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 2697723cf1485a070776a90d210f872770496ae9
parent 7f5355826b91083c5e12fe7fc4013580f27b7771
Author: David Goulet <dgoulet@torproject.org>
Date:   Thu,  1 Jun 2023 09:32:11 -0400

scripts: Use latest geoip database instead of using location

Signed-off-by: David Goulet <dgoulet@torproject.org>

Diffstat:
Mscripts/maint/geoip/update_geoip.sh | 10+++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git 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)