aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/snort-dev/snort.inc31
-rw-r--r--config/snort-dev/snort_interfaces.php6
-rwxr-xr-xpkg_config.7.xml2
3 files changed, 26 insertions, 13 deletions
diff --git a/config/snort-dev/snort.inc b/config/snort-dev/snort.inc
index b1300e1a..6fae43ab 100644
--- a/config/snort-dev/snort.inc
+++ b/config/snort-dev/snort.inc
@@ -93,18 +93,27 @@ function sync_package_snort()
exec("/bin/mkdir -p /usr/local/etc/snort/rules");
if(file_exists("/usr/local/etc/snort/snort.conf-sample")) {
- exec("/bin/rm /usr/local/etc/snort/snort.conf-sample");
- exec("/bin/rm /usr/local/etc/snort/threshold.conf-sample");
- exec("/bin/rm /usr/local/etc/snort/sid-msg.map-sample");
- exec("/bin/rm /usr/local/etc/snort/unicode.map-sample");
- exec("/bin/rm /usr/local/etc/snort/classification.config-sample");
- exec("/bin/rm /usr/local/etc/snort/generators-sample");
- exec("/bin/rm /usr/local/etc/snort/reference.config-sample");
- exec("/bin/rm /usr/local/etc/snort/gen-msg.map-sample");
- exec("/bin/rm /usr/local/etc/snort/sid");
- exec("/bin/rm -f /usr/local/etc/rc.d/snort");
+ exec("/bin/rm /usr/local/etc/snort/snort.conf-sample");
+ exec("/bin/rm /usr/local/etc/snort/threshold.conf-sample");
+ exec("/bin/rm /usr/local/etc/snort/sid-msg.map-sample");
+ exec("/bin/rm /usr/local/etc/snort/unicode.map-sample");
+ exec("/bin/rm /usr/local/etc/snort/classification.config-sample");
+ exec("/bin/rm /usr/local/etc/snort/generators-sample");
+ exec("/bin/rm /usr/local/etc/snort/reference.config-sample");
+ exec("/bin/rm /usr/local/etc/snort/gen-msg.map-sample");
+ exec("/bin/rm /usr/local/etc/snort/sid");
+ exec("/bin/rm -f /usr/local/etc/rc.d/snort");
}
-
+
+ /* remove example files */
+ /* TODO: remove these filese during binary builds */
+ if(file_exists("/usr/local/lib/snort/dynamicrules/lib_sfdynamic_example_rule.so.0")) {
+ exec('/bin/rm /usr/local/lib/snort/dynamicrules/lib_sfdynamic_example*');
+ }
+ if(file_exists("/usr/local/lib/snort/dynamicpreprocessor/lib_sfdynamic_preprocessor_example.so")) {
+ exec('/bin/rm /usr/local/lib/snort/dynamicpreprocessor/lib_sfdynamic_preprocessor_example*');
+ }
+
/* snort advanced features - bpf tuning */
// if($bpfbufsize)
// $start .= "sysctl net.bpf.bufsize={$bpfbufsize}\n";
diff --git a/config/snort-dev/snort_interfaces.php b/config/snort-dev/snort_interfaces.php
index 877d6e6c..974e2673 100644
--- a/config/snort-dev/snort_interfaces.php
+++ b/config/snort-dev/snort_interfaces.php
@@ -31,6 +31,7 @@
require("guiconfig.inc");
require("/usr/local/pkg/snort/snort_gui.inc");
+include_once("/usr/local/pkg/snort/snort.inc");
$id = $_GET['id'];
if (isset($_POST['id']))
@@ -153,12 +154,15 @@ if ($_GET['act'] == "toggle" && $_GET['id'] != "") {
$snort_pid2 = exec("/bin/ps -auwx | grep -v grep | grep \"$if_real2 -c\" | awk '{print $2;}'");
if ($snort_pid2 != "") {
exec("/bin/sh /usr/local/etc/rc.d/snort_{$id}{$if_real2}.sh stop");
+ header("Location: snort_interfaces.php");
}else{
+ sync_package_snort();
exec("/bin/sh /usr/local/etc/rc.d/snort_{$id}{$if_real2}.sh start");
+ header("Location: snort_interfaces.php");
}
}
-$pgtitle = "Services: Snort 2.8.4.1_5 pkg v. 1.8 alpha";
+$pgtitle = "Services: Snort 2.8.4.1_5 pkg v. 1.8 beta";
include("head.inc");
?>
diff --git a/pkg_config.7.xml b/pkg_config.7.xml
index b90a96ef..6ba22bcb 100755
--- a/pkg_config.7.xml
+++ b/pkg_config.7.xml
@@ -323,7 +323,7 @@
<config_file>http://www.pfsense.com/packages/config/snort-dev/snort.xml</config_file>
<version>2.8.4.1_5 pkg v. 1.8</version>
<required_version>1.2.2</required_version>
- <status>alpha</status>
+ <status>beta</status>
<configurationfile>snort.xml</configurationfile>
<after_install_info>WARNING: This is the Snort-dev branch and may be unstable.</after_install_info>
</package>