diff --git a/plugins/mpd/mpdstats_ b/plugins/mpd/mpdstats_ index b54edfdc..65f9194f 100755 --- a/plugins/mpd/mpdstats_ +++ b/plugins/mpd/mpdstats_ @@ -69,7 +69,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. MPDHOST=${mpd_host:-localhost} MPDPORT=${mpd_port:-6600} -NCBIN=${netcat:-/bin/nc} +NCBIN=${netcat:-$(which nc)} + # # FUNCTIONS @@ -85,8 +86,8 @@ do_autoconf () { ;; esac - if [ ! -x $NCBIN ] ; then - echo "no ($NCBIN: not found or not executable)" + if [ -z "$NCBIN" ] ; then + echo "no (missing netcat program ('nc'))" exit 1 fi