1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-10-27 03:47:40 +00:00

Fix: remove systemd service on uninstall

This commit is contained in:
jcorporation
2018-09-17 18:53:10 +01:00
parent 4c5bb30c8c
commit ebb6a607e9
4 changed files with 31 additions and 9 deletions

View File

@@ -79,13 +79,7 @@ post_remove() {
# unlink music dir
echo "unlinking musicdir to library"
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 ] && rm /usr/share/mympd/htdocs/library
else
echo -e "\e[93mWARNING\e[0m: /etc/mpd.conf not found, you must unlink your musicdir manually from \e[1m/usr/share/mympd/htdocs/library\e[0m"
fi
[ -e /usr/share/mympd/htdocs/library ] && rm -v /usr/share/mympd/htdocs/library
# remove mympd user and group
getent passwd mympd > /dev/null