From 7e2a9feda5183565ed766a964cbe08fdc8e26469 Mon Sep 17 00:00:00 2001 From: tommy Date: Sat, 4 Jan 2025 11:05:37 +0000 Subject: [PATCH] Update apps/home-assistant/entrypoint.sh --- apps/home-assistant/entrypoint.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/home-assistant/entrypoint.sh b/apps/home-assistant/entrypoint.sh index c9a1771..d1016b5 100644 --- a/apps/home-assistant/entrypoint.sh +++ b/apps/home-assistant/entrypoint.sh @@ -1,11 +1,22 @@ #!/usr/bin/env bash #shellcheck disable=SC2086 +# Create /config/tmp if it doesn't exist and ensure proper permissions +if [[ ! -d /config/tmp ]]; then + mkdir -p /config/tmp + chmod 1777 /config/tmp +fi + +# Set TMPDIR environment variable for uv and other temporary file operations +export TMPDIR="/config/tmp" + +# Ensure HACS installation if requested if [[ "${HOME_ASSISTANT__HACS_INSTALL}" == "true" ]]; then curl -sfSL https://get.hacs.xyz | bash - fi +# Execute Home Assistant with the provided arguments exec \ /usr/local/bin/hass \ --config /config \ - "$@" \ No newline at end of file + "$@"