summaryrefslogtreecommitdiffstats
path: root/etc/inc/shaper.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-03-08 02:36:16 +0000
committerErmal Luçi <eri@pfsense.org>2009-03-08 02:36:16 +0000
commitddd127ebd48860b93ec9cca2e6ad073307f50880 (patch)
treed41659d74c470a147b70d493e951cacbf9763c03 /etc/inc/shaper.inc
parentea79cf11620776f1fbcbc2045d020d68646936d6 (diff)
downloadpfsense-ddd127ebd48860b93ec9cca2e6ad073307f50880.zip
pfsense-ddd127ebd48860b93ec9cca2e6ad073307f50880.tar.gz
Correctly detect processes pid's.
Diffstat (limited to 'etc/inc/shaper.inc')
-rw-r--r--etc/inc/shaper.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index 4390b7e..b71b986 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -3401,10 +3401,11 @@ function layer7_start_l7daemon() {
unset($l7pid);
/* Only reread the configuration rather than restart to avoid loosing information. */
- $l7pid = `/bin/ps -ax | /usr/bin/grep ipfw-classifyd | /usr/bin/grep ". $l7rules->GetRPort() . " | /usr/bin/grep -v \"grep\" | /usr/bin/awk '{ print $1}'`;
- if (isset($l7pid))
- mwexec("/bin/kill -HUP {$l7pid}");
- else {
+ exec("/bin/ps -ax | /usr/bin/grep ipfw-classifyd | /usr/bin/grep ". $l7rules->GetRPort() . " | /usr/bin/grep -v grep | /usr/bin/awk '{ print $1}'", $l7pid);
+ if (count($l7pid) > 0) {
+ log_error("Sending HUP signal to {$l7pid[0]}");
+ mwexec("/bin/kill -HUP {$l7pid[0]}");
+ } else {
// XXX: Hardcoded number of packets to garbage collect and queue length..
$ipfw_classifyd_init = "/usr/local/sbin/ipfw-classifyd -n 5 -q 700 -c {$path} -p " . $l7rules->GetRPort() . " -P /usr/local/share/protocols";
mwexec_bg($ipfw_classifyd_init);
OpenPOWER on IntegriCloud