diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-02-01 16:59:46 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-02-01 16:59:46 -0200 |
commit | 3d54aa10caf2d78e2ee6550321ffdb087c550830 (patch) | |
tree | 17825baa22114e9dcd8beee3456396a1b5a5cfc4 /etc/inc/rrd.inc | |
parent | 48126e256f42e0628b8d6b7c63363da98a8f3b64 (diff) | |
download | pfsense-3d54aa10caf2d78e2ee6550321ffdb087c550830.zip pfsense-3d54aa10caf2d78e2ee6550321ffdb087c550830.tar.gz |
Avoid killing apinger's rrdtool processes on kill_traffic_collector(). It helps a problem reported on comment of ticket #1399
Diffstat (limited to 'etc/inc/rrd.inc')
-rw-r--r-- | etc/inc/rrd.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/etc/inc/rrd.inc b/etc/inc/rrd.inc index 31b4b6d..841ee45 100644 --- a/etc/inc/rrd.inc +++ b/etc/inc/rrd.inc @@ -280,6 +280,9 @@ function enable_rrd_graphing() { $rrdupdatesh = "#!/bin/sh\n"; $rrdupdatesh .= "\n"; $rrdupdatesh .= "export TERM=dumb\n"; + $rrdupdatesh .= "\n"; + $rrdupdatesh .= 'echo $$ > ' . $g['varrun_path'] . '/updaterrd.sh.pid'; + $rrdupdatesh .= "\n"; $rrdupdatesh .= "counter=1\n"; $rrdupdatesh .= "while [ \"\$counter\" -ne 0 ]\n"; $rrdupdatesh .= "do\n"; @@ -808,8 +811,9 @@ function enable_rrd_graphing() { } function kill_traffic_collector() { - mwexec("killall rrdtool", true); - mwexec("/bin/pkill -a -f updaterrd.sh", true); + global $g; + + killbypid("{$g['varrun_path']}/updaterrd.sh.pid"); } ?> |