mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Fix multiple shellcheck issues
This commit is contained in:
parent
5b1099fb83
commit
7fed3b9765
18 changed files with 59 additions and 50 deletions
|
@ -154,6 +154,7 @@ config() {
|
|||
# -v varname
|
||||
# True if the shell variable varname is set (has been assigned a value).
|
||||
# https://stackoverflow.com/a/45385463/2683737
|
||||
# shellcheck disable=SC2102
|
||||
while [[ -v d_attr[$i,field] ]]; do
|
||||
field=${d_attr[$i,field]}
|
||||
echo "$field.type ${d_attr[$i,type]}"
|
||||
|
@ -181,6 +182,7 @@ fetch() {
|
|||
|
||||
# create an array of queries
|
||||
i=0
|
||||
# shellcheck disable=SC2102
|
||||
while [[ -v d_attr[$i,field] ]]; do
|
||||
query+=("${d_attr[$i,sql]}")
|
||||
((++i))
|
||||
|
@ -211,6 +213,7 @@ fetch() {
|
|||
# extract result and echo it to stdout, which is
|
||||
# captured by Munin
|
||||
i=0
|
||||
# shellcheck disable=SC2102
|
||||
while [[ -v d_attr[$i,field] ]]; do
|
||||
echo "${d_attr[$i,field]}.value ${results[$i]}"
|
||||
((++i))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue