From fb1634c2d76d1b71f445016aa5f228c989e90e40 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 6 Mar 2025 18:10:07 +0100 Subject: [PATCH] Improve bashio replacement --- .templates/00-banner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.templates/00-banner.sh b/.templates/00-banner.sh index 3c48dadd1..83b7ea81e 100755 --- a/.templates/00-banner.sh +++ b/.templates/00-banner.sh @@ -16,7 +16,7 @@ if ! bashio::supervisor.ping 2>/dev/null; then '-----------------------------------------------------------' # Use environment variables instead of addon options echo "... convert scripts to use environment variables instead of addon options" - for scripts in /etc/cont-init.d/*; do + for scripts in $(grep -srl "bashio" /etc/cont-init.d /etc/s6-overlay/s6-rc.d /custom-services.d); do sed -i -e 's/bashio::config.has_value[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"']/[ ! -z "${\1:-}" ]/g' \ -e 's/bashio::config.true[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"']/[ ! -z "${\1:-}" ] \&\& [ "${\1:-}" = "true" ]/g' \ -e 's/\$(bashio::config[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"'])/${\1:-}/g' \