diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc index 07dfaea0e..a3fe8c3d6 100644 --- a/src/etc/inc/filter.inc +++ b/src/etc/inc/filter.inc @@ -121,7 +121,9 @@ function filter_configure() */ if (!file_exists("/var/run/booting")) { configd_run('filter reload'); - configd_run('filter sync restart'); + if ( isset($config['hasync']['synchronizetoip']) && trim($config['hasync']['synchronizetoip']) != "") { + configd_run('filter sync restart'); + } } } diff --git a/src/www/status_filter_reload.php b/src/www/status_filter_reload.php index 114f17dea..8e50abe1b 100644 --- a/src/www/status_filter_reload.php +++ b/src/www/status_filter_reload.php @@ -42,7 +42,10 @@ if($_GET['getstatus']) { } if($_POST['reloadfilter']) { configd_run("filter reload"); - configd_run("filter sync reload"); + if ( isset($config['hasync']['synchronizetoip']) && trim($config['hasync']['synchronizetoip']) != "") { + // only try to sync when hasync is configured + configd_run("filter sync reload"); + } header("Location: status_filter_reload.php"); exit; }