From 8b9a68742db7e92edb44bdeb14d6e1dba249d3c9 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 5 Oct 2006 21:27:42 +0000 Subject: Call sync_package_snort_reinstall() on install. --- packages/snort/snort.inc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'packages/snort/snort.inc') 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); -- cgit v1.2.3