aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-04-30 15:26:43 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-04-30 15:26:43 -0400
commit9a903edc41c8caebfae64243f809633ef070b223 (patch)
tree8706fc87a64215fd32eef3f77ad232636bd12944 /config
parent0506fcd915a0a174eadf77c822135fdc4c7d168d (diff)
downloadpfsense-packages-9a903edc41c8caebfae64243f809633ef070b223.tar.gz
pfsense-packages-9a903edc41c8caebfae64243f809633ef070b223.tar.bz2
pfsense-packages-9a903edc41c8caebfae64243f809633ef070b223.zip
Better fix for preventing multiple rm_blocked cron entries.
Diffstat (limited to 'config')
-rwxr-xr-xconfig/snort/snort.inc13
1 files changed, 2 insertions, 11 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index 677b387e..c0c5756c 100755
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -755,17 +755,8 @@ function snort_rm_blocked_install_cron($should_install) {
$snort_rm_blocked_expire = "2419200";
}
- // First remove any existing "expiretable" jobs for Snort. We
- // have to remove them because otherwise install_cron_job() will
- // think we are installing a different job if the 'expire seconds'
- // parameter differs from the old one when we call the function.
- $result = array();
- $result = preg_grep('/expiretable\b\s*-t\s*(\d+)\s*snort2c\b/i', file('/etc/crontab'));
- if (count($result) > 0) {
- foreach($result as $job) {
- install_cron_job(trim(substr($job, strpos($job, "/usr/bin/nice"))), FALSE);
- }
- }
+ // First remove any existing "expiretable" jobs for Snort.
+ install_cron_job("snort2c", false);
// Now either install the new or updated cron job,
// or return if "rm_blocked" is disabled