#!/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 \ "$@"