Refactor Navidrome (#6300)
This commit is contained in:
parent
08e451f8de
commit
63d65420a9
@ -27,27 +27,19 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
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 ]]; then touch /opt/${APP}_version.txt; fi
|
RELEASE=$(curl -fsSL https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
if [[ "${RELEASE}" != "$(cat ~/.navidrome 2>/dev/null)" ]] || [[ ! -f ~/.navidrome ]]; then
|
||||||
msg_info "Stopping Services"
|
msg_info "Stopping Services"
|
||||||
systemctl stop navidrome
|
systemctl stop navidrome
|
||||||
msg_ok "Services Stopped"
|
msg_ok "Services Stopped"
|
||||||
|
|
||||||
msg_info "Updating ${APP} to ${RELEASE}"
|
fetch_and_deploy_gh_release "navidrome" "navidrome/navidrome" "binary"
|
||||||
TMP_DEB=$(mktemp --suffix=.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}"
|
|
||||||
echo "${RELEASE}" >/opt/"${APP}_version.txt"
|
|
||||||
msg_ok "Updated Navidrome"
|
|
||||||
|
|
||||||
msg_info "Starting Services"
|
msg_info "Starting Services"
|
||||||
systemctl start navidrome
|
systemctl start navidrome
|
||||||
msg_ok "Started Services"
|
msg_ok "Started Services"
|
||||||
|
|
||||||
msg_info "Cleaning Up"
|
|
||||||
rm -f "${TMP_DEB}"
|
|
||||||
msg_ok "Cleaned"
|
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
else
|
else
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
|
@ -1,40 +1,40 @@
|
|||||||
{
|
{
|
||||||
"name": "Navidrome",
|
"name": "Navidrome",
|
||||||
"slug": "navidrome",
|
"slug": "navidrome",
|
||||||
"categories": [
|
"categories": [
|
||||||
13
|
13
|
||||||
],
|
],
|
||||||
"date_created": "2024-05-02",
|
"date_created": "2024-05-02",
|
||||||
"type": "ct",
|
"type": "ct",
|
||||||
"updateable": true,
|
"updateable": true,
|
||||||
"privileged": false,
|
"privileged": false,
|
||||||
"interface_port": 4533,
|
"interface_port": 4533,
|
||||||
"documentation": null,
|
"documentation": "https://www.navidrome.org/docs/",
|
||||||
"website": "https://www.navidrome.org/",
|
"website": "https://www.navidrome.org/",
|
||||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/navidrome.webp",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/navidrome.webp",
|
||||||
"config_path": "/etc/navidrome/navidrome.toml",
|
"config_path": "/etc/navidrome/navidrome.toml",
|
||||||
"description": "Navidrome is a music server solution that makes your music collection accessible from anywhere. It provides a modern web-based user interface and compatibility with a range of third-party mobile apps for both iOS and Android devices. With Navidrome, users can access their music collection from anywhere, whether at home or on the go. The software supports a variety of music formats, making it easy for users to play their favorite songs and albums. Navidrome provides a simple and user-friendly interface for managing and organizing music collections, making it a valuable tool for music lovers who want to access their music from anywhere. The software is designed to be easy to set up and use, making it a popular choice for those who want to host their own music server and enjoy their music collection from anywhere.",
|
"description": "Navidrome is a music server solution that makes your music collection accessible from anywhere. It provides a modern web-based user interface and compatibility with a range of third-party mobile apps for both iOS and Android devices. With Navidrome, users can access their music collection from anywhere, whether at home or on the go. The software supports a variety of music formats, making it easy for users to play their favorite songs and albums. Navidrome provides a simple and user-friendly interface for managing and organizing music collections, making it a valuable tool for music lovers who want to access their music from anywhere. The software is designed to be easy to set up and use, making it a popular choice for those who want to host their own music server and enjoy their music collection from anywhere.",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
{
|
{
|
||||||
"type": "default",
|
"type": "default",
|
||||||
"script": "ct/navidrome.sh",
|
"script": "ct/navidrome.sh",
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": 2,
|
"cpu": 2,
|
||||||
"ram": 1024,
|
"ram": 1024,
|
||||||
"hdd": 4,
|
"hdd": 4,
|
||||||
"os": "debian",
|
"os": "debian",
|
||||||
"version": "12"
|
"version": "12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default_credentials": {
|
"default_credentials": {
|
||||||
"username": null,
|
"username": null,
|
||||||
"password": null
|
"password": null
|
||||||
},
|
},
|
||||||
"notes": [
|
"notes": [
|
||||||
{
|
{
|
||||||
"text": "To change Navidrome music folder path, `nano /etc/navidrome/navidrome.toml`",
|
"text": "To change Navidrome music folder path, `nano /etc/navidrome/navidrome.toml`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -14,18 +14,14 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies (Patience)"
|
msg_info "Installing Dependencies (Patience)"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y ffmpeg
|
||||||
ffmpeg
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Navidrome"
|
fetch_and_deploy_gh_release "navidrome" "navidrome/navidrome" "binary"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/navidrome/navidrome/releases/latest | grep "tag_name" | awk -F '"' '{print $4}')
|
|
||||||
TMP_DEB=$(mktemp --suffix=.deb)
|
msg_info "Starting Navidrome"
|
||||||
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}"
|
|
||||||
systemctl enable -q --now navidrome
|
systemctl enable -q --now navidrome
|
||||||
echo "${RELEASE}" >/opt/Navidrome_version.txt
|
msg_ok "Started Navidrome"
|
||||||
msg_ok "Installed Navidrome"
|
|
||||||
|
|
||||||
read -p "${TAB3}Do you want to install filebrowser addon? (y/n) " -n 1 -r
|
read -p "${TAB3}Do you want to install filebrowser addon? (y/n) " -n 1 -r
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
@ -36,7 +32,6 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -f "${TMP_DEB}"
|
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user