From f9ad1bdd9b31cb65923445319d9c38c689b9d3f8 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 17 May 2008 10:06:55 +0000 Subject: [PATCH] Create playlist and music directory set in the configuration file (#3448) SVN-Revision: 11159 --- sound/mpd/files/mpd.init | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sound/mpd/files/mpd.init b/sound/mpd/files/mpd.init index 418cfe147..e0579f196 100644 --- a/sound/mpd/files/mpd.init +++ b/sound/mpd/files/mpd.init @@ -3,6 +3,15 @@ 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 @@ -21,4 +30,4 @@ start() { stop() { killall mpd } - \ No newline at end of file + -- 2.30.2