From a000ea83f56e8f36ae1e6c10e1c6afca32aab5af Mon Sep 17 00:00:00 2001 From: AdSchellevis Date: Fri, 17 Apr 2015 20:08:05 +0000 Subject: [PATCH] disable hasync when not configured --- src/etc/inc/filter.inc | 4 +++- src/www/status_filter_reload.php | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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; }