navidrome
This commit is contained in:
parent
fbec66b009
commit
a412a7007b
@ -27,33 +27,25 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/hudikhq/hoodik/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -fsSL https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk -F '"' '{print $4}')
|
||||||
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
msg_info "Stopping Services"
|
msg_info "Stopping Services"
|
||||||
systemctl stop
|
systemctl stop navidrome
|
||||||
msg_ok "Services Stopped"
|
msg_ok "Services Stopped"
|
||||||
|
|
||||||
msg_info "Updating ${APP} to ${RELEASE}"
|
msg_info "Updating ${APP} to ${RELEASE}"
|
||||||
cd /opt
|
TMP_DEB=$(mktemp --suffix=.deb)
|
||||||
if [ -d hoodik_bak ]; then
|
curl -fsSL -o "${TMP_DEB}" "https://github.com/navidrome/navidrome/releases/download/${RELEASE}/navidrome_${RELEASE#v}_linux_amd64.deb"
|
||||||
rm -rf hoodik_bak
|
$STD apt-get install -y "${TMP_DEB}"
|
||||||
fi
|
echo "${RELEASE}" >/opt/"${APP}_version.txt"
|
||||||
mv hoodik hoodik_bak
|
msg_ok "Updated Navidrome"
|
||||||
curl -fsSL "https://github.com/hudikhq/hoodik/archive/refs/tags/${RELEASE}.zip"
|
|
||||||
unzip -q ${RELEASE}.zip
|
|
||||||
mv hoodik-${RELEASE} /opt/hoodik
|
|
||||||
cd /opt/hoodik
|
|
||||||
cargo update -q
|
|
||||||
cargo build -q --release
|
|
||||||
msg_ok "Updated Hoodik"
|
|
||||||
|
|
||||||
msg_info "Starting Services"
|
msg_info "Starting Services"
|
||||||
systemctl start hoodik
|
systemctl start navidrome
|
||||||
msg_ok "Started Services"
|
msg_ok "Started Services"
|
||||||
|
|
||||||
msg_info "Cleaning Up"
|
msg_info "Cleaning Up"
|
||||||
rm -R /opt/${RELEASE}.zip
|
rm -f "${TMP_DEB}"
|
||||||
rm -R /opt/hoodik_bak
|
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
else
|
else
|
||||||
@ -69,4 +61,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8088${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:4533${CL}"
|
||||||
|
@ -24,6 +24,7 @@ TMP_DEB=$(mktemp --suffix=.deb)
|
|||||||
curl -fsSL -o "${TMP_DEB}" "https://github.com/navidrome/navidrome/releases/download/${RELEASE}/navidrome_${RELEASE#v}_linux_amd64.deb"
|
curl -fsSL -o "${TMP_DEB}" "https://github.com/navidrome/navidrome/releases/download/${RELEASE}/navidrome_${RELEASE#v}_linux_amd64.deb"
|
||||||
$STD apt-get install -y "${TMP_DEB}"
|
$STD apt-get install -y "${TMP_DEB}"
|
||||||
systemctl enable -q --now navidrome.service
|
systemctl enable -q --now navidrome.service
|
||||||
|
echo "${RELEASE}" >/opt/"${APP}_version.txt"
|
||||||
msg_ok "Installed Navidrome"
|
msg_ok "Installed Navidrome"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user