From 5c88b12b9f1f7df83fd8656b7ec052dfced8b84f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Apr 2026 16:00:48 +0000 Subject: [PATCH] Pre-create camera data directories in install.sh capture.sh creates the per-day subdirectory at runtime, but BASE_DIR/ and MOVIES_DIR/ need to exist first. Create them during install so the capture service works immediately on first start without needing a separate manual mkdir step. https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ --- install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/install.sh b/install.sh index c4df99e..beb226d 100755 --- a/install.sh +++ b/install.sh @@ -29,6 +29,17 @@ fi mkdir -p "$UNIT_DIR" echo "Installing systemd units to $UNIT_DIR ..." +# ── Pre-create data directories for all cameras ─────────────────────────────── +echo "Creating data directories..." +for cam in "${CAMERAS[@]}"; do + mkdir -p "$BASE_DIR/$cam" + mkdir -p "$MOVIES_DIR/$cam" + echo " $BASE_DIR/$cam" + echo " $MOVIES_DIR/$cam" +done +mkdir -p "$BASE_DIR/$SUNRISE_CAM" +echo "" + # ── Helper: write a oneshot service unit ───────────────────────────────────── write_service() { local unit="$1" description="$2" script="$3" extra="${4:-}"