2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

[mpdstats_] use 'which' for finding 'nc'

This commit is contained in:
Lars Kruse 2016-10-22 13:41:58 +02:00
parent d6ea0c926d
commit 380c4a9ea5

View File

@ -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