Update apps/home-assistant/entrypoint.sh

This commit is contained in:
Tommy 2025-01-04 11:05:37 +00:00
parent e1a341b0de
commit 7e2a9feda5
Signed by: Mooo[bot]
GPG key ID: CF3AFE4D5B62BB9A

View file

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