aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/pfblockerng/pfblockerng.inc18
1 files changed, 11 insertions, 7 deletions
diff --git a/config/pfblockerng/pfblockerng.inc b/config/pfblockerng/pfblockerng.inc
index afd7a0ce..4ec46d85 100644
--- a/config/pfblockerng/pfblockerng.inc
+++ b/config/pfblockerng/pfblockerng.inc
@@ -1784,6 +1784,7 @@ function sync_package_pfblockerng($cron='') {
// Reloads existing lists without downloading new lists when defined 'on'
$pfb['reuse'] = $pfb['config']['pfb_reuse'];
$pfb['reuse_dnsbl'] = '';
+ $pfb['updatednsbl'] = FALSE; // Set flag to allow DNSBL Reload, only when called via background cmd.
// Define update process (update or reload)
switch ($cron) {
@@ -1801,6 +1802,7 @@ function sync_package_pfblockerng($cron='') {
case 'updatednsbl':
$pfb['reuse'] = '';
$pfb['reuse_dnsbl'] = 'on';
+ $pfb['updatednsbl'] = TRUE;
break;
case 'updateip':
$pfb['reuse'] = 'on';
@@ -2304,13 +2306,15 @@ function sync_package_pfblockerng($cron='') {
$dnsbl_error = TRUE;
}
- // Determine if a DNSBL Reload is running
- $result_cron = array();
- exec('/bin/ps -wax', $result_cron);
- if (preg_grep("/pfblockerng[.]php\s+?(updatednsbl)/", $result_cron)) {
- $log = "\n ** DNSBL Update Terminated due to active pfBlockerNG cron process\n";
- pfb_logger("{$log}", 1);
- $dnsbl_error = TRUE;
+ if (!$pfb['updatednsbl']) {
+ // Determine if a DNSBL Reload is running
+ $result_cron = array();
+ exec('/bin/ps -wax', $result_cron);
+ if (preg_grep("/pfblockerng[.]php\s+?(updatednsbl)/", $result_cron)) {
+ $log = "\n ** DNSBL Reload Terminated due to active pfBlockerNG cron process\n";
+ pfb_logger("{$log}", 1);
+ $dnsbl_error = TRUE;
+ }
}
}