aboutsummaryrefslogtreecommitdiffstats
path: root/packages/snort/snort.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-10-05 21:27:42 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-10-05 21:27:42 +0000
commit8b9a68742db7e92edb44bdeb14d6e1dba249d3c9 (patch)
tree2d71f59db970439400439fa85bbfaaafcd358087 /packages/snort/snort.inc
parent459df7ec9e97699d265992346e522aa3c31a9075 (diff)
downloadpfsense-packages-8b9a68742db7e92edb44bdeb14d6e1dba249d3c9.tar.gz
pfsense-packages-8b9a68742db7e92edb44bdeb14d6e1dba249d3c9.tar.bz2
pfsense-packages-8b9a68742db7e92edb44bdeb14d6e1dba249d3c9.zip
Call sync_package_snort_reinstall() on install.
Diffstat (limited to 'packages/snort/snort.inc')
-rw-r--r--packages/snort/snort.inc14
1 files changed, 12 insertions, 2 deletions
diff --git a/packages/snort/snort.inc b/packages/snort/snort.inc
index 23e006f9..325ceab1 100644
--- a/packages/snort/snort.inc
+++ b/packages/snort/snort.inc
@@ -31,6 +31,16 @@
if($config['installedpackages']['snort'])
$oinkid = $config['installedpackages']['snort']['config'][0]['oinkmastercode'];
+function sync_package_snort_reinstall() {
+ global $config;
+ if(!$config['installedpackages']['snort'])
+ return;
+ /* create snort configuration file */
+ create_snort_conf();
+ /* start snort service */
+ start_service("snort");
+}
+
function sync_package_snort() {
global $config, $g;
conf_mount_rw();
@@ -188,9 +198,9 @@ function generate_snort_conf() {
/* foreach through whitelist, writing out to file */
$whitelist_split = split("\n", $whitelist_home_net);
- foreach($whitelist_split as $wl)
+ foreach($whitelist_split as $wl)
if(trim($wl))
- fwrite($whitelist, trim($wl) . "\n");
+ fwrite($whitelist, trim($wl) . "\n");
/* close file */
fclose($whitelist);