#!/bin/sh /etc/rc.common # Copyright (C) 2007-2011 OpenWrt.org # extended by iNetCom/jh 2012-12-14 START=93 start() { #create mpd directories pld=`grep ^playlist_directory /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/~/\/root/g"` mpddir=`grep ^db_file /etc/mpd.conf | cut -d "\"" -f 2 | sed "s/db_file//g" | sed "s/\/database//g"` if [ ! -d $pld ]; then mkdir -m 0755 -p $pld fi if [ ! -d $mpddir ]; then mkdir -m 0755 -p $mpddir echo "created $mpddir" fi [ -x /usr/bin/amixer ] && amixer set Master,0 10%,10% unmute >/dev/null 2>&1 if [ -x /bin/nice ]; then nice="nice -n -20" fi $nice /usr/bin/mpd } stop() { service_stop /usr/bin/mpd }