diff --git a/plugins/mpd/mpdstats_ b/plugins/mpd/mpdstats_ index c2975e0c..c6f240df 100755 --- a/plugins/mpd/mpdstats_ +++ b/plugins/mpd/mpdstats_ @@ -89,9 +89,10 @@ ACTION="$(basename "$0" | sed 's/^.*_//')" # do_autoconf () { + # shellcheck disable=SC2086 if [ -z "$NCBIN" ] ; then echo "no (missing netcat program ('nc'))" - elif ! echo stats | "$NCBIN" "$NCARGS" "$MPDHOST" "$MPDPORT" >/dev/null 2>&1; then + elif ! echo stats | "$NCBIN" $NCARGS "$MPDHOST" "$MPDPORT" >/dev/null 2>&1; then echo "no (connection failed)" else echo "yes" @@ -101,7 +102,8 @@ do_autoconf () { get_mpd_stats_keys() { - echo stats | "$NCBIN" "$NCARGS" "$MPDHOST" "$MPDPORT" | awk 'BEGIN {FS=":"} /^[^ ]+:/ {print $1}' + # shellcheck disable=SC2086 + echo stats | "$NCBIN" $NCARGS "$MPDHOST" "$MPDPORT" | awk 'BEGIN {FS=":"} /^[^ ]+:/ {print $1}' } @@ -110,7 +112,8 @@ print_mpd_stat_value() { local fieldname local stat_value fieldname="$(clean_fieldname "$key")" - stat_value="$(echo stats | "$NCBIN" "$NCARGS" "$MPDHOST" "$MPDPORT" | awk "/^${key}:/ {print \$2}")" + # shellcheck disable=SC2086 + stat_value="$(echo stats | "$NCBIN" $NCARGS "$MPDHOST" "$MPDPORT" | awk "/^${key}:/ {print \$2}")" echo "${fieldname}.value $stat_value" }