From 685adfe4c8c1372438e4b7404eb72ef5adfb6cd7 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 2 Mar 2025 14:11:53 +0100 Subject: [PATCH] Test shebangs --- .templates/ha_entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.templates/ha_entrypoint.sh b/.templates/ha_entrypoint.sh index ba716f33b..3575265c1 100755 --- a/.templates/ha_entrypoint.sh +++ b/.templates/ha_entrypoint.sh @@ -28,7 +28,7 @@ for SCRIPTS in /etc/cont-init.d/*; do currentshebang="$(sed -n '1{s/^#![[:blank:]]*//p;q}' "$SCRIPTS")" if [ ! -f "${currentshebang%% *}" ]; then for shebang in "/command/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/bin/bash" "/bin/sh"; do - if [ -f "${shebang%% *}" ]; then + if [ -f "${shebang%% *}" ] && [[ "${shebang%% *} echo \"yes\"" ]]; then break fi done