From 46c54f98e2dd0a26218df45beec81c76b60c1034 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 28 Jul 2025 08:47:06 +0200 Subject: [PATCH] Use /usr/bin/env bashio first --- .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 d1a26b61e..64dcf9fa3 100644 --- a/.templates/ha_entrypoint.sh +++ b/.templates/ha_entrypoint.sh @@ -30,7 +30,7 @@ run_script() { # Get current shebang, if not available use another currentshebang="$(sed -n '1{s/^#![[:blank:]]*//p;q}' "$SCRIPTS")" if [ ! -f "${currentshebang%% *}" ]; then - for shebang in "/command/with-contenv bashio" "/usr/bin/with-contenv bashio" "/usr/bin/env bashio" "/usr/bin/bashio" "/usr/bin/bash" "/usr/bin/sh" "/bin/bash" "/bin/sh"; do + for shebang in "/usr/bin/env bashio" "/usr/bin/with-contenv bashio" "/command/with-contenv bashio" "/usr/bin/bashio" "/usr/bin/bash" "/usr/bin/sh" "/bin/bash" "/bin/sh"; do command_path="${shebang%% *}" if [ -x "$command_path" ] && "$command_path" echo "yes" > /dev/null 2>&1; then echo "Valid shebang: $shebang"