mpd: new version, should fix some bugs
[openwrt/svn-archive/archive.git] / sound / mpd / files / mpd.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2007 OpenWrt.org
3 START=93
4
5 start() {
6 #create mpd db
7 /usr/bin/mpd --stdout --create-db
8
9 #optional export for mpc
10 #export MPD_HOST=127.0.0.1
11
12 #start mpd
13 /usr/bin/mpd
14
15 #generate playlist and start to play
16 /usr/bin/mpc listall | /usr/bin/mpc add -
17 /usr/bin/mpc play
18 /usr/bin/mpc repeat
19 }
20
21 stop() {
22 killall mpd
23 }
24