Pre-create camera data directories in install.sh
capture.sh creates the per-day subdirectory at runtime, but BASE_DIR/<cam> and MOVIES_DIR/<cam> 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
This commit is contained in:
+11
@@ -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:-}"
|
||||
|
||||
Reference in New Issue
Block a user