From 7bd19857bf7fda05e49c1c3c026e3c8786949f69 Mon Sep 17 00:00:00 2001 From: BBcan177 Date: Sun, 3 Apr 2016 18:49:24 -0400 Subject: Update pfblockerng.inc * Fix file verification process * Add missing variable --- config/pfblockerng/pfblockerng.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/config/pfblockerng/pfblockerng.inc b/config/pfblockerng/pfblockerng.inc index 437d912d..4df77922 100644 --- a/config/pfblockerng/pfblockerng.inc +++ b/config/pfblockerng/pfblockerng.inc @@ -2480,7 +2480,15 @@ function sync_package_pfblockerng($cron='') { } // Rebuild DNSBL database or DNSBL statistics if files are not found - if (!file_exists("{$pfb['dnsbl_file']}.conf") || !file_exists($pfb['dnsbl_info'])) { + $dnsbl_missing = FALSE; + if (!file_exists("{$pfb['dnsbl_file']}.conf")) { + $dnsbl_missing = TRUE; + } + if (!file_exists("{$pfb['dnsbl_info']}")) { + $dnsbl_missing = TRUE; + } + + if ($dnsbl_missing) { $log = "Missing DNSBL stats and/or Unbound DNSBL conf file - Rebuilding\n"; pfb_logger("{$log}", 1); $pfb['reuse_dnsbl'] = 'on'; @@ -3153,7 +3161,7 @@ function sync_package_pfblockerng($cron='') { } else { // When DNSBL is enabled and no Aliases are defined, or all Aliases are Disabled. Set flag to clear out Unbound pfb_dnsbl.conf file. - if (empty($lists_dnsbl_all)) { + if (empty($lists_dnsbl_all) && !$pfb['save']) { pfb_logger("\nClearing all DNSBL Feeds... ", 1); $pfb['domain_clear'] = TRUE; $pfb_output = @fopen("{$pfb['dnsbl_file']}.conf", 'w'); -- cgit v1.2.3