diff options
-rw-r--r-- | packages/snort/snort.inc | 14 | ||||
-rw-r--r-- | packages/snort/snort.xml | 2 |
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(); |