mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-17 10:00:30 +02:00
8050ec7af1
Navidrome 0.61.x created cache, artwork and plugins under the data folder whenever any navidrome command ran, including the ones the deb postinstall runs as root. 0.62 stopped creating them that way but never corrected the owner, so a container that passed through 0.61.x carries a root-owned artwork directory. 0.64.0 is the first release to write into it and fails with writing image store: mkdir /var/lib/navidrome/artwork/hashed: permission denied which breaks newly resolved album covers and every playlist cover, since those are composites. Repair the three directories the same way navidrome/navidrome#6143 does: the entries themselves only, since they were created empty, real directories owned by root only, and chown -h, because the navidrome user owns the data folder and could otherwise plant a symlink. The trailing || true is not in the upstream copy and is needed here. Their postinstall runs without set -e, while update_script runs under catch_errors, which sets -Ee with an ERR trap. find exits 1 as soon as one starting point is missing, so on a container without a plugins directory the update would abort. Fixes the report in #17247, confirmed there by the reporter's stat and dpkg log: artwork is root-owned and dated to their 0.60.3 -> 0.61.1 upgrade.
60 lines
1.9 KiB
Bash
60 lines
1.9 KiB
Bash
#!/usr/bin/env bash
|
|
_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main"
|
|
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
|
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
|
# Copyright (c) 2021-2026 community-scripts ORG
|
|
# Author: MickLesk (CanbiZ)
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://github.com/navidrome/navidrome
|
|
|
|
APP="Navidrome"
|
|
var_tags="${var_tags:-music}"
|
|
var_cpu="${var_cpu:-2}"
|
|
var_ram="${var_ram:-1024}"
|
|
var_disk="${var_disk:-4}"
|
|
var_os="${var_os:-debian}"
|
|
var_version="${var_version:-13}"
|
|
var_arm64="${var_arm64:-yes}"
|
|
var_unprivileged="${var_unprivileged:-1}"
|
|
|
|
header_info "$APP"
|
|
variables
|
|
color
|
|
catch_errors
|
|
|
|
function update_script() {
|
|
header_info
|
|
check_container_storage
|
|
check_container_resources
|
|
if [[ ! -d /var/lib/navidrome ]]; then
|
|
msg_error "No ${APP} Installation Found!"
|
|
exit
|
|
fi
|
|
|
|
if check_for_gh_release "navidrome" "navidrome/navidrome"; then
|
|
msg_info "Stopping Services"
|
|
systemctl stop navidrome
|
|
msg_ok "Services Stopped"
|
|
|
|
fetch_and_deploy_gh_release "navidrome" "navidrome/navidrome" "binary"
|
|
|
|
find /var/lib/navidrome/cache /var/lib/navidrome/artwork /var/lib/navidrome/plugins \
|
|
-maxdepth 0 -type d -user root -exec chown -h navidrome:navidrome {} + 2>/dev/null || true
|
|
|
|
msg_info "Starting Services"
|
|
systemctl start navidrome
|
|
msg_ok "Started Services"
|
|
msg_ok "Updated successfully!"
|
|
fi
|
|
exit
|
|
}
|
|
|
|
start
|
|
build_container
|
|
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 "${GATEWAY}${BGN}http://${IP}:4533${CL}"
|