fix(lyrion): correct service name and version file in update script (#13734)

This commit is contained in:
CanbiZ (MickLesk) 2026-04-14 21:22:32 +02:00 committed by GitHub
parent a17ba89e7b
commit 209f92bf0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View file

@ -30,16 +30,16 @@ function update_script() {
exit exit
fi fi
DEB_URL=$(curl -s 'https://lyrion.org/getting-started/' | grep -oP '<a\s[^>]*href="\K[^"]*amd64\.deb(?="[^>]*>)' | head -n 1) DEB_URL=$(curl_with_retry 'https://lyrion.org/getting-started/' | grep -oP '<a\s[^>]*href="\K[^"]*amd64\.deb(?="[^>]*>)' | head -n 1)
RELEASE=$(echo "$DEB_URL" | grep -oP 'lyrionmusicserver_\K[0-9.]+(?=_amd64\.deb)') RELEASE=$(echo "$DEB_URL" | grep -oP 'lyrionmusicserver_\K[0-9.]+(?=_amd64\.deb)')
DEB_FILE="/tmp/lyrionmusicserver_${RELEASE}_amd64.deb" DEB_FILE="/tmp/lyrionmusicserver_${RELEASE}_amd64.deb"
if [[ ! -f /opt/lyrion_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/lyrion_version.txt)" ]]; then if [[ ! -f /opt/lyrion_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/lyrion_version.txt)" ]]; then
msg_info "Updating $APP to ${RELEASE}" msg_info "Updating $APP to ${RELEASE}"
curl -fsSL -o "$DEB_FILE" "$DEB_URL" curl_with_retry "$DEB_URL" "$DEB_FILE"
$STD apt install "$DEB_FILE" -y $STD apt install "$DEB_FILE" -y
systemctl restart lyrion systemctl restart lyrionmusicserver
$STD rm -f "$DEB_FILE" rm -f "$DEB_FILE"
echo "${RELEASE}" >/opt/${APP}_version.txt echo "${RELEASE}" >/opt/lyrion_version.txt
msg_ok "Updated $APP to ${RELEASE}" msg_ok "Updated $APP to ${RELEASE}"
msg_ok "Updated successfully!" msg_ok "Updated successfully!"
else else

View file

@ -14,10 +14,10 @@ network_check
update_os update_os
msg_info "Setup Lyrion Music Server" msg_info "Setup Lyrion Music Server"
DEB_URL=$(curl -fsSL 'https://lyrion.org/getting-started/' | grep -oP '<a\s[^>]*href="\K[^"]*amd64\.deb(?="[^>]*>)' | head -n 1) DEB_URL=$(curl_with_retry 'https://lyrion.org/getting-started/' | grep -oP '<a\s[^>]*href="\K[^"]*amd64\.deb(?="[^>]*>)' | head -n 1)
RELEASE=$(echo "$DEB_URL" | grep -oP 'lyrionmusicserver_\K[0-9.]+(?=_amd64\.deb)') RELEASE=$(echo "$DEB_URL" | grep -oP 'lyrionmusicserver_\K[0-9.]+(?=_amd64\.deb)')
DEB_FILE="/tmp/lyrionmusicserver_${RELEASE}_amd64.deb" DEB_FILE="/tmp/lyrionmusicserver_${RELEASE}_amd64.deb"
curl -fsSL -o "$DEB_FILE" "$DEB_URL" curl_with_retry "$DEB_URL" "$DEB_FILE"
$STD apt install "$DEB_FILE" -y $STD apt install "$DEB_FILE" -y
rm -f "$DEB_FILE" rm -f "$DEB_FILE"
echo "${RELEASE}" >"/opt/lyrion_version.txt" echo "${RELEASE}" >"/opt/lyrion_version.txt"