set HOME to /config for non-root services

This commit is contained in:
Josh Hawkins
2026-08-27 07:47:58 -05:00
parent f0772ce580
commit e37a3e9a63
@@ -4,6 +4,13 @@
set -o errexit -o nounset -o pipefail
# $HOME is /root from the container env and survives s6-setuidgid, so cache
# and telemetry writes (huggingface, openvino) fail after the drop. Set it
# before opt_in_out so the opt-out marker lands where the service will look.
if [[ "${FRIGATE_RUN_AS_ROOT:-false}" != "true" ]]; then
export HOME=/config
fi
# opt out of openvino telemetry
if [ -e /usr/local/bin/opt_in_out ]; then
/usr/local/bin/opt_in_out --opt_out > /dev/null 2>&1