aboutsummaryrefslogtreecommitdiffstats
path: root/packages/snort
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-09-27 03:38:08 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-09-27 03:38:08 +0000
commitff2d667f748414a55188bc8c9d9c1d645d395a0f (patch)
treeea1f6eb8ac636bf235949c72f2cd74eff222208a /packages/snort
parent4fddb11ea3dcc8d4a20a079d4f4f2373ddcdbbaa (diff)
downloadpfsense-packages-ff2d667f748414a55188bc8c9d9c1d645d395a0f.tar.gz
pfsense-packages-ff2d667f748414a55188bc8c9d9c1d645d395a0f.tar.bz2
pfsense-packages-ff2d667f748414a55188bc8c9d9c1d645d395a0f.zip
Install crontab entry and restart cron if needed
Diffstat (limited to 'packages/snort')
-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>