From 4ed5bf0c12027658e7700d894aa1502191615780 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 23 Dec 2024 19:08:55 +0100 Subject: [PATCH] Fix Navidrome Update & Install (#991) * Update navidrome.sh * Update navidrome-install.sh * remove develop * remove empty line --- ct/navidrome.sh | 12 +++++++----- install/navidrome-install.sh | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ct/navidrome.sh b/ct/navidrome.sh index e3c7d465..3c606f68 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -34,16 +34,18 @@ function update_script() { fi RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') msg_info "Stopping ${APP}" - systemctl stop navidrome.service + systemctl stop navidrome msg_ok "Stopped Navidrome" msg_info "Updating to v${RELEASE}" - wget https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_linux_amd64.tar.gz -O Navidrome.tar.gz &>/dev/null + cd /opt + wget -q https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_linux_amd64.tar.gz -O Navidrome.tar.gz tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ &>/dev/null + chmod +x /opt/navidrome/navidrome msg_ok "Updated ${APP}" - rm Navidrome.tar.gz + rm -rf /opt/Navidrome.tar.gz - msg_info "${GN} Starting ${APP}" + msg_info "Starting ${APP}" systemctl start navidrome.service msg_ok "Started ${APP}" msg_ok "Updated Successfully" @@ -57,4 +59,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:4533${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:4533${CL}" diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh index a78f5e91..2bf37bcb 100644 --- a/install/navidrome-install.sh +++ b/install/navidrome-install.sh @@ -20,14 +20,14 @@ $STD apt-get install -y mc $STD apt-get install -y ffmpeg msg_ok "Installed Dependencies" -RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - msg_info "Installing Navidrome" +RELEASE=$(curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') install -d -o root -g root /opt/navidrome install -d -o root -g root /var/lib/navidrome wget -q https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_linux_amd64.tar.gz -O Navidrome.tar.gz $STD tar -xvzf Navidrome.tar.gz -C /opt/navidrome/ chown -R root:root /opt/navidrome +chmod +x /opt/navidrome/navidrome mkdir -p /music cat </var/lib/navidrome/navidrome.toml MusicFolder = '/music'