mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
[chrony] switch from bash to sh; fix shell style issues
This commit is contained in:
parent
39976312f7
commit
6cb29a3bf3
1 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
#
|
||||
# Script to parse Chrony Tracking Output
|
||||
#
|
||||
|
@ -52,11 +52,11 @@ if [ "$1" = "config" ]; then
|
|||
echo 'graph_category time'
|
||||
i=0
|
||||
for a in $fields ; do
|
||||
i=$(expr $i + 1);
|
||||
word=`echo $fieldnames | cut -f $i -d '='`;
|
||||
factor=`echo $fieldfactors | cut -f $i -d ' '`;
|
||||
i=$((i + 1))
|
||||
word="$(echo "$fieldnames" | cut -f "$i" -d '=')"
|
||||
factor="$(echo "$fieldfactors" | cut -f "$i" -d ' ')"
|
||||
echo "$a.label $word$factor)";
|
||||
echo "$a.type GAUGE";
|
||||
echo "$a.type GAUGE"
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue