1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-10-23 18:07:42 +00:00

Feat: install don't override existing smart playlists

This commit is contained in:
jcorporation
2018-10-01 20:12:59 +01:00
parent bf188ebdc2
commit f9dc014adc
7 changed files with 38 additions and 0 deletions

View File

@@ -49,6 +49,18 @@ post_upgrade() {
/usr/share/mympd/crcert.sh
fi
# move smartpls into place unless already existing
for PLDIST in /var/lib/mympd/smartpls/*.dist
do
PLS=$(basename $PLDIST .dist)
if [ -f /var/lib/mympd/smartpls/$PLS ]
then
rm $PLDIST
else
mv $PLDIST /var/lib/mympd/smartpls/$PLS
fi
done
# move config into place unless already existing
if [ ! -f /etc/mympd/mympd.conf ]
then

View File

@@ -63,6 +63,19 @@ fi
[ -e /usr/share/mympd/htdocs/pics ] || ln -s /var/lib/mympd/pics /usr/share/mympd/htdocs/
# move smartpls into place unless already existing
for PLDIST in /var/lib/mympd/smartpls/*.dist
do
PLS=$(basename $PLDIST .dist)
if [ -f /var/lib/mympd/smartpls/$PLS ]
then
rm $PLDIST
else
mv $PLDIST /var/lib/mympd/smartpls/$PLS
fi
done
# move config into place unless already existing
if [ ! -f /etc/mympd/mympd.conf ]
then
mv /etc/mympd/mympd.conf.dist /etc/mympd/mympd.conf