Update apps/home-assistant/entrypoint.sh
This commit is contained in:
parent
e1a341b0de
commit
7e2a9feda5
1 changed files with 12 additions and 1 deletions
|
@ -1,11 +1,22 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#shellcheck disable=SC2086
|
#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
|
if [[ "${HOME_ASSISTANT__HACS_INSTALL}" == "true" ]]; then
|
||||||
curl -sfSL https://get.hacs.xyz | bash -
|
curl -sfSL https://get.hacs.xyz | bash -
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Execute Home Assistant with the provided arguments
|
||||||
exec \
|
exec \
|
||||||
/usr/local/bin/hass \
|
/usr/local/bin/hass \
|
||||||
--config /config \
|
--config /config \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
Loading…
Reference in a new issue