mirror of
https://github.com/SuperBFG7/ympd
synced 2025-10-25 19:07:41 +00:00
Fix: remove systemd service on uninstall
This commit is contained in:
2
debian/postinst
vendored
2
debian/postinst
vendored
@@ -28,7 +28,9 @@ then
|
||||
if [ contrib/mympd.service -nt /usr/lib/systemd/system/mympd.service ]
|
||||
then
|
||||
cp contrib/mympd.service /usr/lib/systemd/system/
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
systemctl enable mympd
|
||||
fi
|
||||
|
||||
# move config into place unless already existing
|
||||
|
||||
14
debian/postrm
vendored
14
debian/postrm
vendored
@@ -1,5 +1,17 @@
|
||||
if [ -f /usr/lib/systemd/system/mympd.service ]
|
||||
then
|
||||
if `systemctl is-active --quiet mympd`
|
||||
then
|
||||
echo "stopping mympd.service" && systemctl stop mympd
|
||||
fi
|
||||
echo "disabling mympd.service" && systemctl disable mympd
|
||||
rm -v -f /usr/lib/systemd/system/mympd.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
|
||||
rm -v -fr /var/lib/mympd
|
||||
rm -v -f /usr/lib/systemd/system/mympd.service
|
||||
|
||||
[ -e /usr/share/mympd/htdocs/library ] && rm -v /usr/share/mympd/htdocs/library
|
||||
rmdir -v /usr/share/{mympd/htdocs/,mympd/}
|
||||
|
||||
getent passwd mympd > /dev/null
|
||||
|
||||
Reference in New Issue
Block a user