feat(entrypoint): Ensure shared directories exist and clean up start_app
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user