diff --git a/ct/headers/lyrionmusicserver b/ct/headers/lyrionmusicserver new file mode 100644 index 00000000000..f23c024e8de --- /dev/null +++ b/ct/headers/lyrionmusicserver @@ -0,0 +1,6 @@ + __ _ __ ___ _ _____ + / / __ _______(_)___ ____ / |/ /_ _______(_)____ / ___/___ ______ _____ _____ + / / / / / / ___/ / __ \/ __ \ / /|_/ / / / / ___/ / ___/ \__ \/ _ \/ ___/ | / / _ \/ ___/ + / /___/ /_/ / / / / /_/ / / / / / / / / /_/ (__ ) / /__ ___/ / __/ / | |/ / __/ / +/_____/\__, /_/ /_/\____/_/ /_/ /_/ /_/\__,_/____/_/\___/ /____/\___/_/ |___/\___/_/ + /____/ diff --git a/ct/lyrionmusicserver.sh b/ct/lyrionmusicserver.sh new file mode 100644 index 00000000000..533aad25bf7 --- /dev/null +++ b/ct/lyrionmusicserver.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Omar Minaya +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://lyrion.org/getting-started/ + +APP="Lyrion Music Server" +var_tags="${var_tags:-media}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-1024}" +var_disk="${var_disk:-3}" +var_os="${var_os:-debian}" +var_version="${var_version:-12}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -f /lib/systemd/system/lyrionmusicserver.service ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + DEB_URL=$(curl -s 'https://lyrion.org/getting-started/' | grep -oP ']*href="\K[^"]*amd64\.deb(?="[^>]*>)' | head -n 1) + RELEASE=$(echo "$DEB_URL" | grep -oP 'lyrionmusicserver_\K[0-9.]+(?=_amd64\.deb)') + DEB_FILE="/tmp/lyrionmusicserver_${RELEASE}_amd64.deb" + if [[ ! -f /opt/lyrion_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/lyrion_version.txt)" ]]; then + msg_info "Updating $APP to ${RELEASE}" + curl -fsSL -o "$DEB_FILE" "$DEB_URL" + $STD apt install "$DEB_FILE" -y + systemctl restart lyrion + echo "${RELEASE}" >/opt/${APP}_version.txt + msg_ok "Updated $APP to ${RELEASE}" + + msg_info "Cleaning up" + $STD rm -f "$DEB_FILE" + $STD apt-get -y autoremove + $STD apt-get -y autoclean + msg_ok "Cleaned" + else + msg_ok "$APP is already up to date (${RELEASE})" + fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access the web interface at:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9000${CL}" diff --git a/frontend/public/json/lyrionmusicserver.json b/frontend/public/json/lyrionmusicserver.json new file mode 100644 index 00000000000..f4bd5553672 --- /dev/null +++ b/frontend/public/json/lyrionmusicserver.json @@ -0,0 +1,35 @@ +{ + "name": "Lyrion Music Server", + "slug": "lyrionmusicserver", + "categories": [ + 9 + ], + "date_created": "2025-05-21", + "type": "ct", + "updateable": true, + "privileged": false, + "config_path": "/etc/default/lyrionmusicserver", + "interface_port": 9000, + "documentation": "https://lyrion.org/", + "website": "https://lyrion.org/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/lyrion-media-server.webp", + "description": "Lyrion Music Server is an open-source server software to stream local music collections, internet radio, and music services to Squeezebox and compatible audio players.", + "install_methods": [ + { + "type": "default", + "script": "ct/lyrionmusicserver.sh", + "resources": { + "cpu": 1, + "ram": 1024, + "hdd": 3, + "os": "Debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} diff --git a/install/lyrionmusicserver-install.sh b/install/lyrionmusicserver-install.sh new file mode 100644 index 00000000000..9061c4ddd37 --- /dev/null +++ b/install/lyrionmusicserver-install.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: Omar Minaya +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://lyrion.org/getting-started/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Setup Lyrion Music Server" +DEB_URL=$(curl -fsSL 'https://lyrion.org/getting-started/' | grep -oP ']*href="\K[^"]*amd64\.deb(?="[^>]*>)' | head -n 1) +RELEASE=$(echo "$DEB_URL" | grep -oP 'lyrionmusicserver_\K[0-9.]+(?=_amd64\.deb)') +DEB_FILE="/tmp/lyrionmusicserver_${RELEASE}_amd64.deb" +curl -fsSL -o "$DEB_FILE" "$DEB_URL" +$STD apt install "$DEB_FILE" -y +echo "${RELEASE}" >"/opt/lyrion_version.txt" +msg_ok "Setup Lyrion Music Server v${RELEASE}" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD rm -f "$DEB_FILE" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned"