aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata/suricata_post_install.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-02-19 22:34:27 -0500
committerbmeeks8 <bmeeks8@bellsouth.net>2014-02-19 22:34:27 -0500
commitb33b9a9d050bd5bc8247fc4c95ff7bde39d612f2 (patch)
tree04bcd4a8f0cb1520a71668dd011eba529a248186 /config/suricata/suricata_post_install.php
parent4b6a70ab6d1a3b50e29e4de5383bf69f867807b1 (diff)
downloadpfsense-packages-b33b9a9d050bd5bc8247fc4c95ff7bde39d612f2.tar.gz
pfsense-packages-b33b9a9d050bd5bc8247fc4c95ff7bde39d612f2.tar.bz2
pfsense-packages-b33b9a9d050bd5bc8247fc4c95ff7bde39d612f2.zip
Incorporate Ermal's comments into Suricata BETA pkg code.
Diffstat (limited to 'config/suricata/suricata_post_install.php')
-rw-r--r--config/suricata/suricata_post_install.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/config/suricata/suricata_post_install.php b/config/suricata/suricata_post_install.php
index 0d6f553e..653f47fd 100644
--- a/config/suricata/suricata_post_install.php
+++ b/config/suricata/suricata_post_install.php
@@ -47,14 +47,14 @@ $rcdir = RCFILEPREFIX;
// Hard kill any running Suricata process that may have been started by any
// of the pfSense scripts such as check_reload_status() or rc.start_packages
if(is_process_running("suricata")) {
- exec("/usr/bin/killall -z suricata");
+ killbyname("suricata");
sleep(2);
// Delete any leftover suricata PID files in /var/run
array_map('@unlink', glob("/var/run/suricata_*.pid"));
}
// Hard kill any running Barnyard2 processes
if(is_process_running("barnyard")) {
- exec("/usr/bin/killall -z barnyard2");
+ killbyname("barnyard2");
sleep(2);
// Delete any leftover barnyard2 PID files in /var/run
array_map('@unlink', glob("/var/run/barnyard2_*.pid"));
@@ -63,13 +63,6 @@ if(is_process_running("barnyard")) {
// Set flag for post-install in progress
$g['suricata_postinstall'] = true;
-// Fix up the sample filenames from a PBI package install
-//$sample_files = array("classification.config", "reference.config", "suricata.yaml");
-//foreach ($sample_files as $file) {
-// if (file_exists("{$suricatadir}{$file}-sample"))
-// @rename("{$suricatadir}{$file}-sample", "{$suricatadir}{$file}");
-//}
-
// Remove any previously installed script since we rebuild it
@unlink("{$rcdir}/suricata.sh");
@@ -92,7 +85,7 @@ if ($config['installedpackages']['suricata']['config'][0]['forcekeepsettings'] =
// Create the suricata.yaml files for each enabled interface
$suriconf = $config['installedpackages']['suricata']['rule'];
foreach ($suriconf as $value) {
- $if_real = suricata_get_real_interface($value['interface']);
+ $if_real = get_real_interface($value['interface']);
// create a suricata.yaml file for interface
suricata_generate_yaml($value);