diff options
author | robiscool <robrob2626@yahoo.com> | 2009-11-21 00:51:11 -0800 |
---|---|---|
committer | robiscool <robrob2626@yahoo.com> | 2009-11-21 00:51:46 -0800 |
commit | 9c263445b3f6ab09bfca57b9ce368924ca79c681 (patch) | |
tree | 7d22129823c5d56fa7da9dfe0db68bb73f143d87 /config/snort-dev/snort_interfaces_edit.php | |
parent | 7840cc8ce79668aa9e479ee0464474269ca04196 (diff) | |
download | pfsense-packages-9c263445b3f6ab09bfca57b9ce368924ca79c681.tar.gz pfsense-packages-9c263445b3f6ab09bfca57b9ce368924ca79c681.tar.bz2 pfsense-packages-9c263445b3f6ab09bfca57b9ce368924ca79c681.zip |
snort-dev,add new start up snort.sh, add new dynamic_ip_reload.php
Diffstat (limited to 'config/snort-dev/snort_interfaces_edit.php')
-rw-r--r-- | config/snort-dev/snort_interfaces_edit.php | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/config/snort-dev/snort_interfaces_edit.php b/config/snort-dev/snort_interfaces_edit.php index f6fc2143..8d9def44 100644 --- a/config/snort-dev/snort_interfaces_edit.php +++ b/config/snort-dev/snort_interfaces_edit.php @@ -75,7 +75,7 @@ if (isset($_GET['dup'])) /* convert fake interfaces to real */ $if_real = convert_friendly_interface_to_real_interface_name($pconfig['interface']); -if ($_POST) { +if ($_POST["Submit"]) { /* input validation */ // if(strtoupper($_POST['proto']) == "TCP" or strtoupper($_POST['proto']) == "UDP" or strtoupper($_POST['proto']) == "TCP/UDP") { @@ -160,21 +160,35 @@ if ($_POST) { $a_nat[] = $natent; } - touch($d_natconfdirty_path); - write_config(); // stop_service("snort"); //create_snort_conf(); //create_barnyard2_conf(); - sync_package_snort(); - // sleep(2); - // start_service("snort"); - header("Location: snort_interfaces.php"); + if ($pconfig['performance'] != "") { + sync_package_snort(); + } + + if ($pconfig['performance'] != "") { + header("Location: /snort/snort_interfaces_edit.php?id=$id"); + }else{ + touch($d_natconfdirty_path); + header("Location: /snort_interfaces.php"); + } exit; } } + if ($_POST["Submit2"]) { + if ($pconfig['performance'] != "") { + sync_package_snort(); + sleep(1); + exec("/bin/sh /usr/local/etc/rc.d/snort_{$id}{$if_real}.sh restart"); + header("Location: /snort/snort_interfaces_edit.php?id=$id"); + exit; + } + } + $pgtitle = "Snort: Interface: $id$if_real Settings Edit"; include("head.inc"); @@ -269,11 +283,8 @@ if($id != "") { /* if base directories dont exist create them */ - if(!file_exists("/usr/local/pkg/snort/snort_{$snortIf}_{$id}/")) - { - exec("/bin/mkdir -p /usr/local/pkg/snort/snort_{$snortIf}_{$id}/"); - if(!file_exists("/usr/local/www/snort/snort_{$snortIf}_{$id}/")) - exec("/bin/mkdir -p /usr/local/www/snort/snort_{$snortIf}_{$id}/"); + if(!file_exists("/usr/local/etc/snort/snort_{$id}{$if_real}/")) { + exec("/bin/mkdir -p /usr/local/etc/snort/snort_{$id}{$if_real}/"); } $tab_array = array(); |