1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-06-16 01:59:55 +00:00

Fix: link to music_directory

This commit is contained in:
jcorporation 2018-08-15 15:05:46 +02:00
parent 7cd1ba8ab2
commit 6ef6d178b4

View File

@ -55,8 +55,8 @@ sudo chown nobody /var/lib/mympd
echo "Trying to link musicdir to library" echo "Trying to link musicdir to library"
if [ -f /etc/mpd.conf ] if [ -f /etc/mpd.conf ]
then then
LIBRARY=$(grep music /etc/mpd.conf | awk {'print $2'} | sed -e 's/"//g') 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 [ "$LIBRARY" != "" ] && [ ! -e /usr/share/mympd/htdocs/library ] && sudo ln -s "$LIBRARY" /usr/share/mympd/htdocs/library
else else
echo "/etc/mpd.conf not found, you must link your musicdir manually to /usr/share/mympd/htdocs/library" echo "/etc/mpd.conf not found, you must link your musicdir manually to /usr/share/mympd/htdocs/library"
fi fi
@ -67,9 +67,9 @@ then
if [ contrib/mympd.service -nt /etc/systemd/system/mympd.service ] if [ contrib/mympd.service -nt /etc/systemd/system/mympd.service ]
then then
sudo cp -v contrib/mympd.service /etc/systemd/system/ sudo cp -v contrib/mympd.service /etc/systemd/system/
systemctl daemon-reload sudo systemctl daemon-reload
fi fi
systemctl enable mympd sudo systemctl enable mympd
fi fi
if [ -d /etc/mympd/ssl ] if [ -d /etc/mympd/ssl ]