capture.sh: source .env so RTSP credentials are available

CAM_RTSP_<cam> is set in .env, not sky-cam.conf, but capture.sh was
only sourcing sky-cam.conf — causing the service to fail with "not set"
even after credentials were added to .env.

https://claude.ai/code/session_01C4jbd3waXG3eKZYbGUjLUQ
This commit is contained in:
Claude
2026-04-21 18:24:29 +00:00
parent 1a1ff1a041
commit 9707e5ca37
+2 -1
View File
@@ -15,6 +15,7 @@ set -euo pipefail
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
source "$SCRIPT_DIR/sky-cam.conf"
source "$SCRIPT_DIR/.env" 2>/dev/null || true
export TZ="$TIMEZONE"
CAM="${1:-}"
@@ -26,7 +27,7 @@ fi
rtsp_var="CAM_RTSP_${CAM}"
RTSP_URL="${!rtsp_var:-}"
if [ -z "$RTSP_URL" ]; then
echo "ERROR: CAM_RTSP_${CAM} not set in sky-cam.conf"
echo "ERROR: CAM_RTSP_${CAM} not set in .env"
exit 1
fi