From ba5133b28d0ff2ad558ec38085be4ea19ea11abf Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 12 Feb 2025 11:28:29 +0100 Subject: [PATCH] Change bashio commands --- .templates/00-banner.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.templates/00-banner.sh b/.templates/00-banner.sh index f4e2cbc0f..2cc62c3a4 100755 --- a/.templates/00-banner.sh +++ b/.templates/00-banner.sh @@ -13,7 +13,11 @@ if ! bashio::supervisor.ping 2>/dev/null; then bashio::log.blue "Please use Docker Compose for env variables" bashio::log.blue \ '-----------------------------------------------------------' + # Use environment variables instead of addon options + echo "... convert scripts to use environment variables instead of addon options" + sed -i -e 's/bashio::config.has_value[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"']/[ ! -z \${\1+x} ]/g' -e 's/bashio::config[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"']/\${\1}/g' /etc/cont-init.d/* # Fake options.json + echo "... create empty /data/options.json for bashio compatibility" mkdir -p /data touch /data/option.json exit 0