This is an automated email from the git hooks/post-receive script.
dgoulet pushed a commit to branch main in repository tor.
The following commit(s) were added to refs/heads/main by this push: new 2697723cf1 scripts: Use latest geoip database instead of using location 2697723cf1 is described below
commit 2697723cf1485a070776a90d210f872770496ae9 Author: David Goulet dgoulet@torproject.org AuthorDate: Thu Jun 1 09:32:11 2023 -0400
scripts: Use latest geoip database instead of using location
Signed-off-by: David Goulet dgoulet@torproject.org --- scripts/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 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)