diff --git a/config.yaml b/config.yaml index e17ae45..973675b 100644 --- a/config.yaml +++ b/config.yaml @@ -7,7 +7,7 @@ server: viewer_port: ":8090" storage: - recordings_path: "" + recordings_path: "/home/master/nvr_data" retention_days: 7 cleanup_interval_mins: 60 diff --git a/deploy_nvr.sh b/deploy_nvr.sh index 3d35ad8..c6a9478 100755 --- a/deploy_nvr.sh +++ b/deploy_nvr.sh @@ -159,33 +159,8 @@ log "Local time: $(date)" TZ=$(timedatectl show --property=Timezone --value 2>/dev/null || cat /etc/timezone 2>/dev/null || echo "unknown") log "Timezone: ${TZ}" -# ── 1c. Storage path ── -echo "" -log "Step 1c/7: Where should recordings be stored?" -info " This is where video clips and snapshots will be saved." -info " Examples: /mnt/recordings, /home/user/nvr, /media/usb-drive" -info " Or set STORAGE_PATH environment variable to skip the prompt." -echo "" -if [ -n "${STORAGE_PATH}" ]; then - log "Using STORAGE_PATH from environment: ${STORAGE_PATH}" -elif [ -e /dev/tty ]; then - read -p " Storage path [${HOME}/nvr_data]: " STORAGE_PATH /dev/null || mkdir -p "${STORAGE_PATH}" -sudo chown "$(whoami):$(id -gn)" "${STORAGE_PATH}" 2>/dev/null || true # ── 6. Install service ── -log "Step 7/7: Service installation..." +log "Step 7/6: Service installation..." RUN_USER="$(whoami)" SERVICE_FILE="/etc/systemd/system/${SERVICE_NAME}.service" @@ -319,7 +289,7 @@ echo "============================================" echo "" info " Web UI: http://$(hostname -I 2>/dev/null | awk '{print $1}' || echo 'localhost'):8080" info " Config: ${DEPLOY_DIR}/config.yaml" -info " Storage: /mnt/recordings/" +info " Storage: $(grep recordings_path ${DEPLOY_DIR}/config.yaml 2>/dev/null | awk '{print $2}' | tr -d '"')" echo "" if $HAS_SYSTEMD; then echo " Service:"