From 6f0576d534f47420f957b61f87ea68a8bf6cf2a2 Mon Sep 17 00:00:00 2001 From: cclohmar Date: Thu, 6 Aug 2026 14:15:13 +0100 Subject: [PATCH] fix: inject storage path into existing config, explain interactive vs piped --- setup.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index 826ec5a..6d5e5ca 100755 --- a/setup.sh +++ b/setup.sh @@ -229,13 +229,12 @@ log "Step 6/7: Configuration..." if [ ! -f "${DEPLOY_DIR}/config.yaml" ]; then cp config.yaml "${DEPLOY_DIR}/config.yaml" - # Inject the user's storage path into the config. - sed -i "s|recordings_path:.*|recordings_path: \"${STORAGE_PATH}\"|" "${DEPLOY_DIR}/config.yaml" log "Default config.yaml created with storage path: ${STORAGE_PATH}" - info "Edit it to match your cameras: nano ${DEPLOY_DIR}/config.yaml" else - log "config.yaml already exists — preserved." + log "config.yaml already exists — updating storage path to: ${STORAGE_PATH}" fi +# Always inject the chosen storage path into config. +sed -i "s|recordings_path:.*|recordings_path: \"${STORAGE_PATH}\"|" "${DEPLOY_DIR}/config.yaml" sudo mkdir -p "${STORAGE_PATH}" 2>/dev/null || mkdir -p "${STORAGE_PATH}" sudo chown "$(whoami):$(id -gn)" "${STORAGE_PATH}" 2>/dev/null || true