updated shebang and fixed incorrect variables
Costa Tsaousis (ktsaou) committed
Jul 14, 2016 at 22:16 UTC
ac06e6bd65dc24eee50d07cc096553f42bd98904
1 file changed
+3
-3
charts.d/example.chart.sh
+3
-3
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+# no need for shebang - this file is loaded from charts.d.plugin
2
3
# if this chart is called X.chart.sh, then all functions and global variables
4
# must start with X_
@@ -48,8 +48,8 @@ example_get() {
48
else
49
example_count=$((1 + (RANDOM * 5 / 32767) ))
50
51
- [ $example_last -gt 16383 -a $value4 -gt 16383 ] && example_value4=$((value4 - 16383))
52
- [ $example_last -le 16383 -a $value4 -lt 16383 ] && example_value4=$((value4 + 16383))
51
+ [ $example_last -gt 16383 -a $example_value4 -gt 16383 ] && example_value4=$((value4 - 16383))
52
+ [ $example_last -le 16383 -a $example_value4 -lt 16383 ] && example_value4=$((value4 + 16383))
53
fi
54
example_last=$example_value4
55