Fix Navidrome Update & Install (#991)

* Update navidrome.sh

* Update navidrome-install.sh

* remove develop

* remove empty line
This commit is contained in:
CanbiZ 2024-12-23 19:08:55 +01:00 committed by GitHub
parent 6debf20d19
commit 4ed5bf0c12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View File

@ -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}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:4533${CL}"

View File

@ -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 <<EOF >/var/lib/navidrome/navidrome.toml
MusicFolder = '/music'