diff --git a/ct/lidarr.sh b/ct/lidarr.sh index 4bf08f3e4..74b7e6781 100644 --- a/ct/lidarr.sh +++ b/ct/lidarr.sh @@ -29,19 +29,24 @@ function update_script() { exit fi - msg_info "Updating $APP LXC" - temp_file="$(mktemp)" - rm -rf /opt/Lidarr - RELEASE=$(curl -fsSL https://api.github.com/repos/Lidarr/Lidarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - curl -fsSL "https://github.com/Lidarr/Lidarr/releases/download/v${RELEASE}/Lidarr.master.${RELEASE}.linux-core-x64.tar.gz" -o "$temp_file" - $STD tar -xvzf "$temp_file" - mv Lidarr /opt - chmod 775 /opt/Lidarr - msg_ok "Updated $APP LXC" + RELEASE=$(curl -fsSL https://api.github.com/repos/Lidarr/Lidarr/releases/latest | jq -r '.tag_name' | sed 's/^v//') + if [[ "${RELEASE}" != "$(cat ~/.lidarr)" ]] || [[ ! -f ~/.lidarr ]]; then - msg_info "Cleaning up" - rm -rf "$temp_file" - msg_ok "Cleaned up" + msg_info "Stopping service" + systemctl stop lidarr + msg_ok "Service stopped" + + fetch_and_deploy_gh_release "lidarr" "Lidarr/Lidarr" "prebuild" "latest" "/opt/Lidarr" "Lidarr.master*linux-core-x64.tar.gz" + chmod 775 /opt/Lidarr + + msg_info "Starting service" + systemctl start lidarr + msg_ok "Service started" + + msg_ok "Updated successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi exit } diff --git a/frontend/public/json/lidarr.json b/frontend/public/json/lidarr.json index 786169f84..755b354bb 100644 --- a/frontend/public/json/lidarr.json +++ b/frontend/public/json/lidarr.json @@ -9,10 +9,10 @@ "updateable": true, "privileged": false, "interface_port": 8686, - "documentation": null, + "documentation": "https://wiki.servarr.com/en/lidarr", "website": "https://lidarr.audio/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/lidarr.webp", - "config_path": "", + "config_path": "/var/lib/lidarr/config.xml", "description": "Lidarr is a music management tool designed for Usenet and BitTorrent users. It allows users to manage and organize their music collection with ease. Lidarr integrates with popular Usenet and BitTorrent clients, such as Sonarr and Radarr, to automate the downloading and organizing of music files. The software provides a web-based interface for managing and organizing music, making it easy to search and find songs, albums, and artists. Lidarr also supports metadata management, including album art, artist information, and lyrics, making it easy for users to keep their music collection organized and up-to-date. The software is designed to be easy to use and provides a simple and intuitive interface for managing and organizing music collections, making it a valuable tool for music lovers who want to keep their collection organized and up-to-date. With Lidarr, users can enjoy their music collection from anywhere, making it a powerful tool for managing and sharing music files.", "install_methods": [ { diff --git a/install/lidarr-install.sh b/install/lidarr-install.sh index cd7f33530..f54127caa 100644 --- a/install/lidarr-install.sh +++ b/install/lidarr-install.sh @@ -20,22 +20,20 @@ $STD apt-get install -y \ mediainfo msg_ok "Installed Dependencies" -msg_info "Installing Lidarr" -temp_file="$(mktemp)" +fetch_and_deploy_gh_release "lidarr" "Lidarr/Lidarr" "prebuild" "latest" "/opt/Lidarr" "Lidarr.master*linux-core-x64.tar.gz" + +msg_info "Configuring Lidarr" mkdir -p /var/lib/lidarr/ chmod 775 /var/lib/lidarr/ -RELEASE=$(curl -fsSL https://api.github.com/repos/Lidarr/Lidarr/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') -curl -fsSL "https://github.com/Lidarr/Lidarr/releases/download/v${RELEASE}/Lidarr.master.${RELEASE}.linux-core-x64.tar.gz" -o "$temp_file" -$STD tar -xvzf "$temp_file" -mv Lidarr /opt chmod 775 /opt/Lidarr -msg_ok "Installed Lidarr" +msg_ok "Configured Lidarr" msg_info "Creating Service" cat </etc/systemd/system/lidarr.service [Unit] Description=Lidarr Daemon After=syslog.target network.target + [Service] UMask=0002 Type=simple @@ -43,6 +41,7 @@ ExecStart=/opt/Lidarr/Lidarr -nobrowser -data=/var/lib/lidarr/ TimeoutStopSec=20 KillMode=process Restart=on-failure + [Install] WantedBy=multi-user.target EOF @@ -53,7 +52,6 @@ motd_ssh customize msg_info "Cleaning up" -rm -rf "$temp_file" $STD apt-get -y autoremove $STD apt-get -y autoclean msg_ok "Cleaned"