###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2019 IPFire Development Team <info@ipfire.org> #
+# Copyright (C) 2007-2022 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
eval $(/usr/local/bin/readhash /var/ipfire/proxy/settings)
+UPDATE_INTERVAL="weekly"
+
# Proxy settings.
# Check if a proxy should be used.
if [[ $UPSTREAM_PROXY ]]; then
fi
# Get the latest location database from server.
-/usr/bin/location-downloader update
+if /usr/bin/location update --cron=$UPDATE_INTERVAL; then
+ # Call location and export all countries in an ipset compatible format.
+ if /usr/bin/location export --directory=/var/lib/location/ipset --family=ipv4 --format=ipset; 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