]> arthur.barton.de Git - netdata.git/commitdiff
updated shebang and fixed incorrect variables
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Thu, 14 Jul 2016 19:16:26 +0000 (22:16 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Thu, 14 Jul 2016 19:16:26 +0000 (22:16 +0300)
charts.d/example.chart.sh

index df6c3a3eeea91a6f129feeafc89a507297b41f83..1f020dee2792dab6a482c67199eeb04ab0fa8ef9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+# no need for shebang - this file is loaded from charts.d.plugin
 
 # if this chart is called X.chart.sh, then all functions and global variables
 # must start with X_
@@ -48,8 +48,8 @@ example_get() {
        else
                example_count=$((1 + (RANDOM * 5 / 32767) ))
 
-               [ $example_last -gt 16383 -a $value4 -gt 16383 ] && example_value4=$((value4 - 16383))
-               [ $example_last -le 16383 -a $value4 -lt 16383 ] && example_value4=$((value4 + 16383))
+               [ $example_last -gt 16383 -a $example_value4 -gt 16383 ] && example_value4=$((value4 - 16383))
+               [ $example_last -le 16383 -a $example_value4 -lt 16383 ] && example_value4=$((value4 + 16383))
        fi
        example_last=$example_value4