2022-12-03 13:23:19 -03:00
|
|
|
#!/command/with-contenv bash
|
2022-11-21 22:31:39 -03:00
|
|
|
# shellcheck shell=bash
|
2022-12-07 10:47:40 -03:00
|
|
|
# Start the go2rtc service
|
2022-11-02 05:36:09 -06:00
|
|
|
|
2022-12-07 10:47:40 -03:00
|
|
|
set -o errexit -o nounset -o pipefail
|
2022-11-02 05:36:09 -06:00
|
|
|
|
|
|
|
|
if [[ -f "/config/frigate-go2rtc.yaml" ]]; then
|
2022-11-21 22:31:39 -03:00
|
|
|
config_path="/config/frigate-go2rtc.yaml"
|
2022-11-02 05:36:09 -06:00
|
|
|
else
|
2022-11-21 22:31:39 -03:00
|
|
|
config_path="/usr/local/go2rtc/go2rtc.yaml"
|
2022-11-02 05:36:09 -06:00
|
|
|
fi
|
|
|
|
|
|
2022-12-07 10:47:40 -03:00
|
|
|
# Replace the bash process with the go2rtc process, redirecting stderr to stdout
|
|
|
|
|
exec 2>&1
|
2022-11-21 22:31:39 -03:00
|
|
|
exec go2rtc -config="${config_path}"
|