summaryrefslogtreecommitdiffstats
path: root/charts.d/ap.chart.sh
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-10-20 22:04:28 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-10-20 22:04:28 +0300
commitaddb52bb18ba356fc1cb5888b1fe5b809137346d (patch)
tree61f3294473d70f9f96e2e302837ff844a70e3207 /charts.d/ap.chart.sh
parentc6d3138cc7ddb21bac33df2fc9f16c6e76ff1426 (diff)
better log management for charts.d.plugin - fixes #1144
Diffstat (limited to 'charts.d/ap.chart.sh')
-rwxr-xr-xcharts.d/ap.chart.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/charts.d/ap.chart.sh b/charts.d/ap.chart.sh
index 7b4f690bb4..477d414859 100755
--- a/charts.d/ap.chart.sh
+++ b/charts.d/ap.chart.sh
@@ -7,13 +7,11 @@ ap_priority=6900
declare -A ap_devs=()
-export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin"
-
# _check is called once, to find out if this chart should be enabled or not
ap_check() {
require_cmd iw || return 1
- local ev=$(iw dev | awk '
+ local ev=$(run iw dev | awk '
BEGIN {
i = "";
ssid = "";
@@ -43,6 +41,7 @@ ap_check() {
# - 1 to disable the chart
[ ${#ap_devs[@]} -gt 0 ] && return 0
+ error "no devices found in AP mode, with 'iw dev'"
return 1
}