#!/bin/sh
PREFIX=/usr/local
case “$1” in
start)
if [ -x ${PREFIX}/sbin/mpd -a
-f ${PREFIX}/etc/mpd/mpd.conf ]; then
${PREFIX}/sbin/mpd -b
echo -n mpd
fi
;;
stop)
killall mpd && echo -n mpd
;;
*)
echo “Usage: basename $0 {start|stop}” >&2
;;
esac
exit 0
;