From 1d383637939f94332657e1b7647d6a322af16448 Mon Sep 17 00:00:00 2001 From: jcorporation Date: Wed, 5 Sep 2018 20:46:40 +0200 Subject: [PATCH] Fix: link mpd music_directory to mympd docroot --- contrib/myMPD.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/myMPD.spec b/contrib/myMPD.spec index 57fc295..ef4744b 100644 --- a/contrib/myMPD.spec +++ b/contrib/myMPD.spec @@ -47,6 +47,11 @@ then [ -d /usr/lib/systemd/system ] || sudo mkdir /usr/lib/systemd/system cp /usr/share/mympd/mympd.service /usr/lib/systemd/system/ fi +if [ -f /etc/mpd.conf ] +then + LIBRARY=$(grep ^music_directory /etc/mpd.conf | awk {'print $2'} | sed -e 's/"//g') + [ "$LIBRARY" != "" ] && [ ! -e /usr/share/mympd/htdocs/library ] && ln -s "$LIBRARY" /usr/share/mympd/htdocs/library +fi chown -R mympd /var/lib/mympd /usr/share/mympd/crcert.sh