aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-09-01 15:41:40 +0000
committerErmal <eri@pfsense.org>2011-09-01 15:41:40 +0000
commit7cf19a88096ec7b58ecbfe42cd5eb1c9e29f858b (patch)
treeaf2c1f3f4fbd3d260c8f3c75b2e98bd95662e392
parentd6200332caa08d2cdf7350a45d9b0bbd56745410 (diff)
downloadpfsense-packages-7cf19a88096ec7b58ecbfe42cd5eb1c9e29f858b.tar.gz
pfsense-packages-7cf19a88096ec7b58ecbfe42cd5eb1c9e29f858b.tar.bz2
pfsense-packages-7cf19a88096ec7b58ecbfe42cd5eb1c9e29f858b.zip
Correct reloading or rules and some information gathering on rc script of snort
-rw-r--r--config/snort/snort.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/config/snort/snort.inc b/config/snort/snort.inc
index f8f20465..73931b22 100644
--- a/config/snort/snort.inc
+++ b/config/snort/snort.inc
@@ -1245,7 +1245,7 @@ function create_snort_sh()
###### For Each Iface
# If Snort proc is NOT running
-if [ "`/bin/ps -auwx | /usr/bin/grep -v grep | /usr/bin/grep "R {$snort_uuid}{$if_real}" | /usr/bin/awk '{print $2;}'`" = "" ]; then
+if [ "`/bin/ps -auwx | /usr/bin/grep -v grep | /usr/bin/grep "R {$snort_uuid}" | /usr/bin/awk '{print $2;}'`" = "" ]; then
/bin/echo "snort.sh run" > /tmp/snort.sh.pid
@@ -1268,9 +1268,9 @@ EOD;
#### Fake start only used on bootup and Pfsense IP changes
#### Only try to restart if snort is running on Iface
-if [ "`/bin/ps -auwx | /usr/bin/grep -v grep | /usr/bin/grep "R {$snort_uuid}{$if_real}" | /usr/bin/awk '{print $2;}'`" != "" ]; then
+if [ "`/bin/ps -auwx | /usr/bin/grep -v grep | /usr/bin/grep "R {$snort_uuid}" | /usr/bin/awk '{print $2;}'`" != "" ]; then
- snort_pid="`/bin/ps -auwx | /usr/bin/grep -v grep | /usr/bin/grep "R {$snort_uuid}{$if_real}" | /usr/bin/awk '{print $2;}'`"
+ snort_pid=`/bin/ps -auwx | /usr/bin/grep -v grep | /usr/bin/grep "R {$snort_uuid}" | /usr/bin/awk '{print $2;}'`
/usr/bin/logger -p daemon.info -i -t SnortStartup "Snort already running, soft restart"
#### Restart Iface
@@ -1283,7 +1283,7 @@ EOE;
$snort_sh_text4[] = <<<EOF
-pid_s=`/bin/ps -auwx | /usr/bin/grep -v grep | /usr/bin/grep "R {$snort_uuid}{$if_real}" | /usr/bin/awk '{print \$2;}'`
+pid_s=`/bin/ps -auwx | /usr/bin/grep -v grep | /usr/bin/grep "R {$snort_uuid}" | /usr/bin/awk '{print \$2;}'`
sleep 3
pid_b=`/bin/ps -auwx | /usr/bin/grep -v grep | /usr/bin/grep "snort_{$snort_uuid}_{$if_real}.u2" | /usr/bin/awk '{print \$2;}'`
@@ -1339,7 +1339,7 @@ rc_start() {
/bin/rm /tmp/snort.sh.pid
#### If on Fake start snort is NOT running DO a real start.
- if [ "`/bin/ps -auwx | grep -v grep | grep "R {$snort_uuid}{$if_real}" | awk '{print $2;}'`" = "" ]; then
+ if [ "`/bin/ps -auwx | grep -v grep | grep "R {$snort_uuid}" | awk '{print $2;}'`" = "" ]; then
rc_start_real