mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Also exclude grep from running processes when grepping for a running packet capture. Also, fix other test to match the recent changes made.
This commit is contained in:
parent
127eb8e023
commit
d67b6b175c
@ -72,7 +72,7 @@ if ($_POST) {
|
||||
|
||||
} elseif ($_POST['stopbtn']!= "") {
|
||||
$action = gettext("Stop");
|
||||
$processes_running = trim(shell_exec('/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep '.$fn.' | /usr/bin/grep -v pflog'));
|
||||
$processes_running = trim(shell_exec("/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep {$fn} | /usr/bin/egrep -v '(pflog|grep)'"));
|
||||
|
||||
//explode processes into an array, (delimiter is new line)
|
||||
$processes_running_array = explode("\n", $processes_running);
|
||||
@ -194,7 +194,7 @@ include("fbegin.inc");
|
||||
<?php
|
||||
|
||||
/* check to see if packet capture tcpdump is already running */
|
||||
$processcheck = (trim(shell_exec("/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep {$fn} | /usr/bin/grep -v pflog")));
|
||||
$processcheck = (trim(shell_exec("/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep {$fn} | /usr/bin/egrep -v '(pflog|grep)'")));
|
||||
|
||||
if ($processcheck != "")
|
||||
$processisrunning = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user