This repository has been archived on 2024-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
unifi-cam-proxy/docker/entrypoint.sh
Liam 8e47a1e896
All checks were successful
Build Docker image / docker (push) Successful in 1m27s
i hate coding
2024-03-02 11:56:50 +00:00

9 lines
310 B
Bash

#!/bin/sh
if [ ! -z "${RTSP_URL:-}" ] && [ ! -z "${HOST}" ] && [ ! -z "${TOKEN}" ]; then
echo "Using RTSP stream from $RTSP_URL"
exec unifi-cam-proxy --host "$HOST" --name "${NAME:-unifi-cam-proxy}" --mac "${MAC:-'AA:BB:CC:00:11:22'}" --cert /client.pem --token "$TOKEN" rtsp -s "$RTSP_URL"
fi
exec "$@"