You are not logged in.
Pages: 1
I'm installing gmpc and for it to work I need MPD. I followed the wiki and understood everything apart from the "Never play on start - Method 1" part. My /etc/rc.d/mdp looks like this:
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
case "$1" in
start)
stat_busy "Starting Music Player Daemon"
[ ! -d /var/run/mpd ] && install -d -g 45 -o 45 /var/run/mpd
/usr/bin/mpd /etc/mpd.conf &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon mpd
stat_done
fi
;;
stop)
stat_busy "Stopping Music Player Daemon"
/usr/bin/mpd --kill /etc/mpd.conf &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon mpd
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
I am not sure where I should put the code mentioned in "Method 1". Could somebody give me a hint? Thanks.
Last edited by C5OK5Y (2010-11-19 20:26:52)
Offline
between:
stat_busy "Starting Music Player Daemon"
and
/usr/bin/mpd /etc/mpd.conf &> /dev/null
Is what I see from what is read there.
Or you could use the method 2 which is more simple I guess.
Last edited by ilusi0n (2010-10-27 12:36:50)
Offline
@ilusi0n
But there allready is something between those two lines:
stat_busy "Starting Music Player Daemon"
[ ! -d /var/run/mpd ] && install -d -g 45 -o 45 /var/run/mpd <--- This line
/usr/bin/mpd /etc/mpd.conf &> /dev/null
Should I replace it?
Offline
Now that you mention... yes there is a line between. I don't really know sorry .
I use mpd as well and I took the second option which for me, was more simple.
Offline
OK I solved it by replacing the content in between the two lines with the code suggested in the wiki (Method 1). Now when I pause the music and restart my PC I can resume playback exactly where I ended.
Offline
Pages: 1