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
|
|
|
|
2023-01-18 10:53:53 -03:00
|
|
|
# Tell S6-Overlay not to restart this service
|
|
|
|
|
s6-svc -O .
|
|
|
|
|
|
2023-01-16 16:50:35 -07:00
|
|
|
raw_config=$(python3 /usr/local/go2rtc/create_config.py)
|
2022-11-02 05:36:09 -06:00
|
|
|
|
2022-12-07 10:47:40 -03:00
|
|
|
# Replace the bash process with the go2rtc process, redirecting stderr to stdout
|
|
|
|
|
exec 2>&1
|
2023-01-16 16:50:35 -07:00
|
|
|
exec go2rtc -config="${raw_config}"
|