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:
+2
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user