From 145534e88f1fe51ea282095192062bd95337dacf Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Sun, 15 Sep 2024 22:40:13 +0200 Subject: [PATCH] download latest GeoIP.dat no matter what (#2668) cc @szaimen Signed-off-by: Daniel Hansson --- nextcloud_update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nextcloud_update.sh b/nextcloud_update.sh index 98ef76a99d..2ea91bdb77 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -586,7 +586,13 @@ then then if grep -c GeoIP.dat /etc/apache2/apache2.conf then - sed -i "s|GeoIPDBFile /usr/share/GeoIP/GeoIP.dat|GeoIPDBFile /usr/share/GeoIP/GeoIPv4.dat|g" /etc/apache2/apache2.conf + if [ ! -f /usr/share/GeoIP/GeoIPv4.dat ] + then + if download_geoip_dat 4 v4 + then + sed -i "s|GeoIPDBFile /usr/share/GeoIP/GeoIP.dat|GeoIPDBFile /usr/share/GeoIP/GeoIPv4.dat|g" /etc/apache2/apache2.conf + fi + fi fi check_command systemctl restart apache2 fi