projects
/
openwrt
/
svn-archive
/
archive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f21a8ab
)
Create playlist and music directory set in the configuration file (#3448)
author
Florian Fainelli
<florian@openwrt.org>
Sat, 17 May 2008 10:06:55 +0000
(10:06 +0000)
committer
Florian Fainelli
<florian@openwrt.org>
Sat, 17 May 2008 10:06:55 +0000
(10:06 +0000)
SVN-Revision: 11159
sound/mpd/files/mpd.init
patch
|
blob
|
history
diff --git
a/sound/mpd/files/mpd.init
b/sound/mpd/files/mpd.init
index 418cfe147fa1cf29492f1354d40a92fa5fa97e28..e0579f1967711e7aa44b7f24cabd7a4eeab2f4bf 100644
(file)
--- 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
+