Skip to content

Commit

Permalink
v9.9
Browse files Browse the repository at this point in the history
- DietPi-Software | Lyrion Music Server: It is "Music" not "Media" now, reasonably, and as the service name has changed without an alies, we need to migrate it on DietPi update
  • Loading branch information
MichaIng committed Dec 11, 2024
1 parent 1aff231 commit dfdbbd2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .meta/dietpi-survey_report
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ shopt -s extglob
[32]='ympd'
[33]='Airsonic-Advanced'
[34]='Subsonic'
[35]='Lyrion Media Server'
[35]='Lyrion Music Server'
[36]='Squeezelite'
[37]='Shairport Sync'
[38]='FreshRSS'
Expand Down
11 changes: 10 additions & 1 deletion .update/patches
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,7 @@ Patch_9_2()
if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[108\]=2' /boot/dietpi/.installed && dpkg --compare-versions "$(dpkg-query -Wf '${Version}' amiberry 2> /dev/null)" lt 5.6.8-dietpi1
then
G_DIETPI-NOTIFY 2 'Preparing Amiberry upgrade to v5.6.8'
echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls
G_EXEC eval 'echo 108 >> /var/tmp/dietpi/dietpi-update_reinstalls'
fi
fi
}
Expand Down Expand Up @@ -2053,6 +2053,15 @@ Patch_9_9()
(( $G_DISTRO < 7 )) || G_EXEC sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/mopidy.list
G_EXEC mv /etc/apt/sources.list.d/{,dietpi-}mopidy.list
fi
# Logitech Media Server => Lyrion Music Server: https://github.com/MichaIng/DietPi/issues/7306
if grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[35\]=2' /boot/dietpi/.installed && [[ -f '/lib/systemd/system/logitechmediaserver.service' ]]
then
G_DIETPI-NOTIFY 2 'Preparing Logitech Media Server reinstall to migrate to Lyrion Music Server ...'
G_EXEC systemctl --no-reload unmask logitechmediaserver
G_EXEC systemctl --no-reload disable --now logitechmediaserver
G_EXEC eval 'echo 35 >> /var/tmp/dietpi/dietpi-update_reinstalls'
fi

fi
}

Expand Down
2 changes: 1 addition & 1 deletion dietpi/dietpi-services
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ _EOF_
# - Media
'ympd'
'mympd'
'logitechmediaserver'
'lyrionmusicserver'
'airsonic'
'mopidy'
'koel'
Expand Down
14 changes: 7 additions & 7 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ Available commands:
aSOFTWARE_DEPS[$software_id]='5 7 196'
#------------------
software_id=35
aSOFTWARE_NAME[$software_id]='Lyrion Media Server'
aSOFTWARE_NAME[$software_id]='Lyrion Music Server'
aSOFTWARE_DESC[$software_id]='formerly Logitech Media Server and Squeezebox Server'
aSOFTWARE_CATX[$software_id]=2
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/media/#logitech-media-server'
Expand Down Expand Up @@ -7037,7 +7037,7 @@ _EOF_
G_EXEC chmod 0600 /etc/haproxy/haproxy.cfg
fi

if To_Install 35 logitechmediaserver # Lyrion Media Server
if To_Install 35 lyrionmusicserver # Lyrion Music Server
then
# Grab architecture
local arch='arm'
Expand All @@ -7046,8 +7046,8 @@ _EOF_
# Grab latest package URL
local fallback_url="https://downloads.lms-community.org/nightly/lyrionmusicserver_9.0.1~1733855934_$arch.deb"
Download_Install "$(curl -sSf 'https://raw.githubusercontent.com/LMS-Community/lms-server-repository/master/stable.xml' | grep -om1 "https://[^\"]*_$arch.deb")"
G_EXEC systemctl stop logitechmediaserver
Remove_SysV logitechmediaserver
G_EXEC systemctl stop lyrionmusicserver
Remove_SysV lyrionmusicserver

# Grant user write access to DietPi media dirs for creating infobrowser.opml.
G_EXEC usermod -aG dietpi squeezeboxserver
Expand Down Expand Up @@ -13274,11 +13274,11 @@ _EOF_
[[ -d '/usr/local/share/man/man1' ]] && G_EXEC rmdir -p --ignore-fail-on-non-empty /usr/local/share/man/man1
fi

if To_Uninstall 35 # Lyrion Media Server
if To_Uninstall 35 # Lyrion Music Server
then
# Stop systemd service, which is not done by postinst, failing to remove user then
Remove_Service logitechmediaserver
G_AGP logitechmediaserver
Remove_Service lyrionmusicserver
G_AGP lyrionmusicserver
[[ -d '/var/lib/squeezeboxserver' ]] && G_EXEC rm -R /var/lib/squeezeboxserver
fi

Expand Down

0 comments on commit dfdbbd2

Please sign in to comment.