#!/command/with-contenv bash
# shellcheck shell=bash
# Start the go2rtc service

set -o errexit -o nounset -o pipefail

raw_config=$(python3 /usr/local/go2rtc/create_config.py)

# Replace the bash process with the go2rtc process, redirecting stderr to stdout
exec 2>&1
exec go2rtc -config="${raw_config}"
