From 9c79442a800abcfaf8bc9a1d1a580deeab19ad65 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 30 Aug 2023 08:40:44 -0400 Subject: script: Attempt to fix geoip script Signed-off-by: David Goulet --- scripts/maint/geoip/update_geoip.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/maint/geoip/update_geoip.sh b/scripts/maint/geoip/update_geoip.sh index ac0e9eb514..c48f4b1b45 100755 --- a/scripts/maint/geoip/update_geoip.sh +++ b/scripts/maint/geoip/update_geoip.sh @@ -8,8 +8,10 @@ TMP=$(mktemp -d) DB_PATH="/var/lib/location/database.db" # In case it exists as a dead symlink. -if [ -e "$DB_PATH" ]; then +if [ -h "$DB_PATH" ]; then unlink "$DB_PATH" +elif [ -e "$DB_PATH" ]; then + rm -f "$DB_PATH" fi curl -o "$DB_PATH.xz" "https://location.ipfire.org/databases/1/location.db.xz" -- cgit v1.2.3-54-g00ecf