aboutsummaryrefslogtreecommitdiffstats
path: root/packages/snort
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
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')
-rw-r--r--packages/snort/snort.inc14
-rw-r--r--packages/snort/snort.xml2
2 files changed, 13 insertions, 3 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);
diff --git a/packages/snort/snort.xml b/packages/snort/snort.xml
index 8165dbe2..be30deb7 100644
--- a/packages/snort/snort.xml
+++ b/packages/snort/snort.xml
@@ -152,7 +152,7 @@
</field>
</fields>
<custom_add_php_install>
- sync_package_snort();
+ sync_package_snort_reinstall();
</custom_add_php_install>
<custom_add_php_command>
sync_package_snort();