firewall/rules.pl: Only try to export locations if needed.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2019-12-09 18:36:54 +01:00
parent c947959100
commit 693b8513df

View File

@@ -110,8 +110,11 @@ sub main {
# Flush exported locations.
&GeoIP::flush_exported_locations();
# Export required locations.
&GeoIP::export_locations(\@locations_to_export);
# Check if there are any locations to export.
if (@locations_to_export) {
# Export required locations.
&GeoIP::export_locations(\@locations_to_export);
}
# Prepare firewall rules.
if (! -z "${General::swroot}/firewall/input"){