X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=charts.d%2Fap.chart.sh;h=7b4f690bb47ece250d03c249e58f294560d3758f;hb=3824a699715d85e0adf61570a4569d09922c7f5c;hp=10a65688c23c0fed9d5eee0aab1bde4613ca8336;hpb=2e8dedd05e58769ecefed51e6c9fdd3d95dbadcb;p=netdata.git diff --git a/charts.d/ap.chart.sh b/charts.d/ap.chart.sh index 10a65688..7b4f690b 100755 --- a/charts.d/ap.chart.sh +++ b/charts.d/ap.chart.sh @@ -1,4 +1,4 @@ -#!/bin/bash +# no need for shebang - this file is loaded from charts.d.plugin # _update_every is a special variable - it holds the number of seconds # between the calls of the _update() function @@ -11,6 +11,8 @@ 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 ' BEGIN { i = ""; @@ -54,25 +56,25 @@ ap_create() { # create the chart with 3 dimensions cat <