#!/bin/sh
# $FreeBSD: ports/audio/mt-daapd/files/mt-daapd.sh,v 1.1 2004/07/19 09:18:51 edwin Exp $

MT_DAAPD=/usr/local/sbin/mt-daapd
MT_DAAPD_CONF=/usr/local/etc/mt-daapd.conf


case "$1" in
	start)
		if [ -r "${MT_DAAPD_CONF}" ]; then
			${MT_DAAPD} -c ${MT_DAAPD_CONF} 
			echo -n ' mt-daapd'
		fi
		;;
	stop)
		killall -TERM mt-daapd
		;;
	*)
		echo ""
		echo "Usage: `basename $0` { start | stop }"
		echo ""
		exit 64
		;;
esac
