diff options
author | Ermal <eri@pfsense.org> | 2014-05-02 07:09:34 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2014-05-02 07:09:34 +0000 |
commit | 8aec99c2678dc2c7bd82ff068733ccc8459a779b (patch) | |
tree | c0a070c35362edcb09abd1e821bb71d9a968b93f /config/suricata/suricata.inc | |
parent | bb88eed5e00ea1064d61020e59349b83f4c633d1 (diff) | |
parent | 7bb99d97c33021c4e4cacb0b8dd739be5933c61f (diff) | |
download | pfsense-packages-8aec99c2678dc2c7bd82ff068733ccc8459a779b.tar.gz pfsense-packages-8aec99c2678dc2c7bd82ff068733ccc8459a779b.tar.bz2 pfsense-packages-8aec99c2678dc2c7bd82ff068733ccc8459a779b.zip |
Merge pull request #654 from bmeeks8/suricata-1.0.1
Diffstat (limited to 'config/suricata/suricata.inc')
-rw-r--r-- | config/suricata/suricata.inc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/config/suricata/suricata.inc b/config/suricata/suricata.inc index a2be802a..53dc678f 100644 --- a/config/suricata/suricata.inc +++ b/config/suricata/suricata.inc @@ -589,8 +589,15 @@ function suricata_rm_blocked_install_cron($should_install) { $suricata_rm_blocked_expire = "2419200"; } - $command = "/usr/bin/nice -n20 /sbin/pfctl -t {$suri_pf_table} -T expire {$suricata_rm_blocked_expire}"; - install_cron_job($command, $should_install, $suricata_rm_blocked_min, $suricata_rm_blocked_hr, $suricata_rm_blocked_mday, $suricata_rm_blocked_month, $suricata_rm_blocked_wday, "root"); + // First, remove any existing cron task for "rm_blocked" hosts + install_cron_job("pfctl -t {$suri_pf_table} -T expire" , false); + + // Now add or update the cron task for "rm_blocked" hosts + // if enabled. + if ($should_install) { + $command = "/usr/bin/nice -n20 /sbin/pfctl -t {$suri_pf_table} -T expire {$suricata_rm_blocked_expire}"; + install_cron_job($command, $should_install, $suricata_rm_blocked_min, $suricata_rm_blocked_hr, $suricata_rm_blocked_mday, $suricata_rm_blocked_month, $suricata_rm_blocked_wday, "root"); + } } function sync_suricata_package_config() { |