Update apps/home-assistant/entrypoint.sh

This commit is contained in:
Tommy 2025-01-04 11:35:21 +00:00
parent e8d83e1e95
commit 4d4c71af28
Signed by: Mooo[bot]
GPG key ID: CF3AFE4D5B62BB9A

View file

@ -1,14 +1,21 @@
#!/usr/bin/env bash
#shellcheck disable=SC2086
# shellcheck disable=SC2086
# Create /config/tmp if it doesn't exist and ensure proper permissions
# Ensure /config/tmp exists and set correct 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
# Ensure /config/.cache/uv exists
if [[ ! -d /config/.cache/uv ]]; then
mkdir -p /config/.cache/uv
chmod -R 775 /config/.cache/uv
fi
# Export necessary environment variables
export TMPDIR="/config/tmp"
export UV_CACHE_DIR="/config/.cache/uv"
# Ensure HACS installation if requested
if [[ "${HOME_ASSISTANT__HACS_INSTALL}" == "true" ]]; then