2024-06-21 23:30:19 +02:00
|
|
|
#!/command/with-contenv bash
|
|
|
|
# shellcheck shell=bash
|
|
|
|
# Start the Frigate service
|
|
|
|
|
|
|
|
set -o errexit -o nounset -o pipefail
|
|
|
|
|
|
|
|
# Logs should be sent to stdout so that s6 can collect them
|
|
|
|
|
|
|
|
# Tell S6-Overlay not to restart this service
|
|
|
|
s6-svc -O .
|
|
|
|
|
2024-08-04 05:06:20 +02:00
|
|
|
search_enabled=`python3 /usr/local/semantic_search/get_search_settings.py | jq -r .enabled`
|
2024-06-21 23:30:19 +02:00
|
|
|
|
|
|
|
# Replace the bash process with the Frigate process, redirecting stderr to stdout
|
|
|
|
exec 2>&1
|
2024-08-04 05:06:20 +02:00
|
|
|
|
|
|
|
if [[ "$search_enabled" == 'true' ]]; then
|
|
|
|
echo "[INFO] Starting ChromaDB..."
|
|
|
|
exec /usr/local/chroma run --path /config/chroma --host 127.0.0.1
|
|
|
|
else
|
|
|
|
while true
|
|
|
|
do
|
|
|
|
sleep 9999
|
|
|
|
continue
|
|
|
|
done
|
|
|
|
exit 0
|
|
|
|
fi
|