feat(entrypoint): Ensure shared directories exist and clean up start_app

This commit is contained in:
2026-02-09 06:53:31 -08:00
parent 76398dec99
commit decb9f5860

View File

@@ -48,10 +48,8 @@ deregister_service() {
start_app() {
echo "Node is Primary. Starting Navidrome..."
# Ensure DB path and local data folder are set
export ND_DATABASE_PATH="/data/navidrome.db"
export ND_DATAFOLDER="/local/data"
mkdir -p /local/data
# Ensure shared directories exist
mkdir -p /shared_data/plugins /shared_data/cache /shared_data/backup
/app/navidrome &
NAVIDROME_PID=$!
@@ -121,4 +119,4 @@ while true; do
# Sleep short enough to update TTL (every 5s is safe for 15s TTL)
sleep 5 &
wait $! # Wait allows the 'trap' to interrupt the sleep instantly
done
done