aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/snort/snort.inc9
-rw-r--r--packages/snort/snort.xml5
2 files changed, 14 insertions, 0 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc
index e86ac148..f96d6293 100644
--- a/packages/snort/snort.inc
+++ b/packages/snort/snort.inc
@@ -106,6 +106,15 @@ function generate_snort_conf() {
/* XXX: make multi wan friendly */
$snort_ext_int = $config['installedpackages']['snort']['config'][0]['iface_array'][0];
+ $text = "*/60\t* \t 1\t *\t *\t root\t /usr/bin/nice -n20 /usr/local/pkg/snort_check_for_rule_updates.php";
+ $file = "/etc/crontab";
+ add_text_to_file($file, $text);
+ remove_text_from_file($file, $text);
+ exec("killall -HUP cron");
+
+ /* should we install a automatic update crontab entry? */
+ $automaticrulesupdate = $config['installedpackages']['snort']['config'][0]['automaticrulesupdate'];
+
if($config['interfaces'][$snort_ext_int]['ipaddr'] == "pppoe")
$snort_ext_int = "ng0";
diff --git a/packages/snort/snort.xml b/packages/snort/snort.xml
index f7108d15..dd6b5a2e 100644
--- a/packages/snort/snort.xml
+++ b/packages/snort/snort.xml
@@ -39,6 +39,11 @@
<chmod>077</chmod>
<item>http://www.pfsense.com/packages/config/snort/snort_blocked.php</item>
</additional_files_needed>
+ <additional_files_needed>
+ <prefix>/usr/local/pkg/</prefix>
+ <chmod>077</chmod>
+ <item>http://www.pfsense.com/packages/config/snort/snort_check_for_rule_updates.php</item>
+ </additional_files_needed>
<service>
<name>snort</name>
<rcfile>snort.sh</rcfile>