File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,8 @@ PACKAGES="${PACKAGES:-}"
1111VENV_PATH="${VENV:-/var/tmp/homeassistant-venv}"
1212CONFIG_PATH=/config
1313
14- # Enable Jemalloc for Home Assistant Core
15- export LD_PRELOAD="/usr/local/lib/libjemalloc.so.2"
16-
1714#
18- # Creating user
15+ # Create user
1916#
2017
2118# Some HA commands seem to fail if we don't have an actual user.
@@ -70,8 +67,6 @@ su "$USER" \
7067# Fix permissions
7168#
7269
73- cd "$CONFIG_PATH" || bashio::exit.nok "Can't find config folder: $CONFIG_PATH"
74-
7570if [ -n "${UMASK}" ]; then
7671 bashio::log.info "Setting umask: $UMASK"
7772 umask "$UMASK"
8479bashio::log.info "Activating venv"
8580. "$VENV_PATH/bin/activate"
8681
82+ # Everything below should be kept in sync with
83+ # core:rootfs/etc/services.d/home-assistant/run
84+ # from upstream:
85+ cd "$CONFIG_PATH" || bashio::exit.nok "Can't find config folder: $CONFIG_PATH"
86+
87+ # Enable Jemalloc for Home Assistant Core, unless disabled
88+ if [[ -z "${DISABLE_JEMALLOC+x}" ]]; then
89+ export LD_PRELOAD="/usr/local/lib/libjemalloc.so.2"
90+ fi
91+
8792bashio::log.info "Starting homeassistant"
8893exec \
8994 s6-setuidgid "$USER" \
You can’t perform that action at this time.
0 commit comments