#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/files/mpd.rc6,v 1.16 2005/10/24 13:41:23 ticho Exp $ depend() { need alsasound localmount use netmount nfsmount esound } checkconfig() { if [ -f /etc/conf.d/mpd ]; then eerror "Please remove the /etc/conf.d/mpd file as it is no longer used." eerror "You may configure your mpd settings in /etc/mpd.conf" fi if ! [ -f /etc/mpd.conf ]; then eerror "Configuration file /etc/mpd.conf does not exist." return 1 fi return 0 } start() { checkconfig || return 1 ebegin "Starting Music Player Daemon" start-stop-daemon --start --quiet --exec /usr/bin/mpd -- --no-create-db /etc/mpd.conf eend $? } stop() { ebegin "Stopping Music Player Daemon" start-stop-daemon --stop --quiet --exec /usr/bin/mpd --oknodo eend $? }