From 5fb684f8f256a20a089cd027e422999dc5a6c68e Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:18:25 +0100 Subject: [PATCH] Update ha_entrypoint.sh --- .templates/ha_entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.templates/ha_entrypoint.sh b/.templates/ha_entrypoint.sh index c7d0a84ef..27d74254c 100755 --- a/.templates/ha_entrypoint.sh +++ b/.templates/ha_entrypoint.sh @@ -34,7 +34,7 @@ for SCRIPTS in /etc/cont-init.d/*; do echo "$SCRIPTS: executing" # Check if run as root - if test "$(id -u)" == 0 && test "$(id -u)" == 0; then + if [ "$(id -u)" == 0 ]; then chown "$(id -u)":"$(id -g)" "$SCRIPTS" chmod a+x "$SCRIPTS" else @@ -60,10 +60,10 @@ for SCRIPTS in /etc/cont-init.d/*; do sed -i "s/bashio::exit.nok/return 1/g" "$SCRIPTS" sed -i "s/bashio::exit.ok/return 0/g" "$SCRIPTS" # shellcheck source=/dev/null - source "$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $? & + source "$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?" & else # Support for posix only shell - "$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $? & + "$SCRIPTS" || echo -e "\033[0;31mError\033[0m : $SCRIPTS exiting $?" & fi # Track the PID of the background process