2022-12-07 14:47:40 +01:00
|
|
|
#!/command/with-contenv bash
|
|
|
|
# shellcheck shell=bash
|
|
|
|
# Start the Frigate service
|
|
|
|
|
|
|
|
set -o errexit -o nounset -o pipefail
|
|
|
|
|
2023-02-19 20:11:12 +01:00
|
|
|
# Logs should be sent to stdout so that s6 can collect them
|
|
|
|
|
2023-01-18 14:53:53 +01:00
|
|
|
# Tell S6-Overlay not to restart this service
|
|
|
|
s6-svc -O .
|
|
|
|
|
2023-02-19 20:11:12 +01:00
|
|
|
echo "[INFO] Starting Frigate..."
|
2023-01-19 00:23:40 +01:00
|
|
|
|
2023-02-19 20:11:12 +01:00
|
|
|
cd /opt/frigate || echo "[ERROR] Failed to change working directory to /opt/frigate"
|
2022-12-07 14:47:40 +01:00
|
|
|
|
|
|
|
# Replace the bash process with the Frigate process, redirecting stderr to stdout
|
|
|
|
exec 2>&1
|
|
|
|
exec python3 -u -m frigate
|