1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

mdpstats_: use 'stats' instead of 'version' in autoconf.

As of v0.21.4 version of the MPD command protocol, it seems that the
`version` command is not valid:

    $ echo version | /bin/nc localhost 6600
    OK MPD 0.21.4
    ACK [5@0] {} unknown command "version"

Use `stats` instead.

https://www.musicpd.org/doc/html/protocol.html#querying-mpd-s-status
This commit is contained in:
ToM 2021-01-16 12:13:34 +01:00 committed by Lars Kruse
parent a45257a64a
commit 829bab4814

View file

@ -83,7 +83,7 @@ ACTION="$(basename "$0" | sed 's/^.*_//')"
do_autoconf () { do_autoconf () {
if [ -z "$NCBIN" ] ; then if [ -z "$NCBIN" ] ; then
echo "no (missing netcat program ('nc'))" echo "no (missing netcat program ('nc'))"
elif ! echo version | "$NCBIN" "$MPDHOST" "$MPDPORT" >/dev/null 2>&1; then elif ! echo stats | "$NCBIN" "$MPDHOST" "$MPDPORT" >/dev/null 2>&1; then
echo "no (connection failed)" echo "no (connection failed)"
else else
echo "yes" echo "yes"