Fix undefined CAM_NAME crash; log when window already closed on re-run

4-seasons.sh, fullday-video.sh: CAM_NAME fallback referenced undefined
\$CAM_NAME — under set -euo pipefail this crashes if called manually without
an argument. Changed to fall back to \$SUNRISE_CAM (matches capture.sh).

daily_sunrise_video.sh: add log message when the capture window has already
closed (manual re-run after the fact). Behaviour is unchanged — processing
proceeds immediately — but the operator now gets a clear confirmation rather
than silence.

https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
Claude
2026-04-20 00:29:47 +00:00
parent 4814c9e158
commit 9039803a51
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ source "$SCRIPT_DIR/sky-cam.conf"
export TIMEZONE # make it visible to season_info.py subprocess
# Camera name: first argument overrides conf (systemd passes it via ExecStart).
CAM_NAME="${1:-$CAM_NAME}"
CAM_NAME="${1:-$SUNRISE_CAM}"
# ── Configuration ──────────────────────────────────────────────────────────────
base_dir="$BASE_DIR"