From 3c442268b6b4cfde6ea9c5545576084fd5c7142b Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 13 Apr 2024 16:45:38 +0200 Subject: [PATCH] Update ha_entrypoint_modif.sh --- .templates/ha_entrypoint_modif.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.templates/ha_entrypoint_modif.sh b/.templates/ha_entrypoint_modif.sh index e02f4d638..8cdbfaaa8 100755 --- a/.templates/ha_entrypoint_modif.sh +++ b/.templates/ha_entrypoint_modif.sh @@ -48,9 +48,10 @@ done sed -i "s|/command/with-contenv bashio|$shebang|g" /ha_entrypoint.sh # Correct for scripts -for files in /etc/cont-init.d/* /etc/services.d/*; do - sed -i "s|/command/with-contenv bashio|$shebang|g" "$files" - sed -i "s|/usr/bin/with-contenv bashio|$shebang|g" "$files" +for string in "/command/with-contenv bashio" "/usr/bin/with-contenv bashio"; do + for file in $(grep -sril "$string" /etc/cont-init.d /etc/services.d /etc/s6-overlay/s6-rc.d); do + sed -i "s|$string|$shebang|g" "$files" + done done # Avoid interference with LOG_LEVEL used in the app