diff --git a/ct/navidrome.sh b/ct/navidrome.sh index 9665559c0..94d631f2e 100644 --- a/ct/navidrome.sh +++ b/ct/navidrome.sh @@ -38,6 +38,15 @@ function update_script() { fetch_and_deploy_gh_release "navidrome" "navidrome/navidrome" "binary" + # The upstream postinstall only chowns the cache directory itself, and only + # on the very first install, so root-owned subdirectories survive upgrades + # and the service can no longer write its artwork there. + if id -u navidrome >/dev/null 2>&1; then + msg_info "Fixing Data Folder Ownership" + chown -R navidrome:navidrome /var/lib/navidrome + msg_ok "Fixed Data Folder Ownership" + fi + msg_info "Starting Services" systemctl start navidrome msg_ok "Started Services" diff --git a/install/navidrome-install.sh b/install/navidrome-install.sh index 8547e71ad..4da35c71c 100644 --- a/install/navidrome-install.sh +++ b/install/navidrome-install.sh @@ -19,6 +19,10 @@ msg_ok "Installed Dependencies" fetch_and_deploy_gh_release "navidrome" "navidrome/navidrome" "binary" +if id -u navidrome >/dev/null 2>&1; then + chown -R navidrome:navidrome /var/lib/navidrome +fi + msg_info "Starting Navidrome" systemctl enable -q --now navidrome msg_ok "Started Navidrome"