Install net-snmp-config into $(STAGING_DIR)/host/bin rather then
[openwrt/svn-archive/archive.git] / sound / mpd / files / mpd.init
index 7fdea351142da171c71b0c33c36b05d2dfee0557..e0579f1967711e7aa44b7f24cabd7a4eeab2f4bf 100644 (file)
@@ -3,11 +3,20 @@
 START=93
 
 start() {
+       #create mpd directories
+       md=`grep music_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"`
+       if [ ! -d $md ]; then
+               mkdir -p $md
+       fi
+       pld=`grep playlist_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"`
+       if [ ! -d $pld ]; then
+               mkdir -p $pld
+       fi
        #create mpd db
         /usr/bin/mpd --stdout --create-db
        
        #optional export for mpc
-        #export MPD_HOST=192.168.111.123
+        #export MPD_HOST=127.0.0.1
        
        #start mpd
         /usr/bin/mpd
@@ -15,9 +24,10 @@ start() {
        #generate playlist and start to play
         /usr/bin/mpc listall | /usr/bin/mpc add -
         /usr/bin/mpc play
+       /usr/bin/mpc repeat     
 }
 
 stop() {
         killall mpd
 }
-                                               
\ No newline at end of file
+