]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
update-location-database: Automatically export database after update.
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 10 Jun 2020 19:24:58 +0000 (21:24 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Wed, 10 Jun 2020 19:24:58 +0000 (21:24 +0200)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
src/scripts/update-location-database

index a329c4cd46bdafe0b63232ae21cfb57e8f7bac5c..d830286cec5bada549c0ebd2ce69fb9f7dfd82c8 100644 (file)
@@ -39,8 +39,11 @@ if [[ $UPSTREAM_PROXY ]]; then
 fi
 
 # Get the latest location database from server.
-if /usr/bin/location-downloader update; then
+if /usr/bin/location update; then
+       # Call location and export all countries in xt_geoip compatible format.
+       if /usr/bin/location export --directory=/usr/share/xt_geoip --family=ipv4 --format=xt_geoip; then
 
-       # Call initscript to reload the firewall.
-       /etc/init.d/firewall reload
+               # Call initscript to reload the firewall.
+               /etc/init.d/firewall reload
+       fi
 fi