disable hasync when not configured

This commit is contained in:
AdSchellevis 2015-04-17 20:08:05 +00:00
parent e274b9f58a
commit a000ea83f5
2 changed files with 7 additions and 2 deletions

View File

@ -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');
}
}
}

View File

@ -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;
}