diff --git a/deploy_nvr.sh b/deploy_nvr.sh index 1611234..1b5f4b7 100755 --- a/deploy_nvr.sh +++ b/deploy_nvr.sh @@ -216,11 +216,25 @@ log "Binary built: nextnvr v${VERSION} ($(du -h nextnvr | cut -f1))" # ── 5. Configuration & directories ── log "Step 5/6: Configuration..." -# Repo includes a default config.yaml. Only warn if it's missing. -if [ ! -f "${DEPLOY_DIR}/config.yaml" ]; then - err "config.yaml not found in repository — deployment may fail." +# Repo includes a default config.yaml. Check if storage path needs setting. +CURRENT_PATH=$(grep recordings_path "${DEPLOY_DIR}/config.yaml" 2>/dev/null | awk -F'"' '{print $2}') +if [ -z "${CURRENT_PATH}" ] || [ "${CURRENT_PATH}" = "/home/master/nvr_data" ]; then + echo "" + info "Storage path not set. Where should recordings be stored?" + if [ -e /dev/tty ]; then + read -p " Path [${HOME}/nvr_data]: " STORAGE_PATH /dev/null || true fi -log "Using config: ${DEPLOY_DIR}/config.yaml" # ── 6. Install service ── log "Step 6/6: Service installation..."