From dfdbbd2bf9dba012bcaac5d404619a2b0117e20c Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 11 Dec 2024 21:50:47 +0100 Subject: [PATCH] v9.9 - 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 --- .meta/dietpi-survey_report | 2 +- .update/patches | 11 ++++++++++- dietpi/dietpi-services | 2 +- dietpi/dietpi-software | 14 +++++++------- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index aef2ee6960..45f2b61bcf 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -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' diff --git a/.update/patches b/.update/patches index 3ce9dfc38f..6281bd5de3 100755 --- a/.update/patches +++ b/.update/patches @@ -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 } @@ -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 } diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index f4d42fbef4..387ccc3f0b 100755 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -174,7 +174,7 @@ _EOF_ # - Media 'ympd' 'mympd' - 'logitechmediaserver' + 'lyrionmusicserver' 'airsonic' 'mopidy' 'koel' diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 4736aaf7bc..492a8a80d2 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -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' @@ -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' @@ -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 @@ -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