From e47950d46851ef7b02e8da1c9437b0fd4a4ec060 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 11 Apr 2025 18:48:07 +0200 Subject: [PATCH] Revert --- .templates/00-banner.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.templates/00-banner.sh b/.templates/00-banner.sh index 26bf37509..7f2aa2c5b 100755 --- a/.templates/00-banner.sh +++ b/.templates/00-banner.sh @@ -18,8 +18,8 @@ if ! bashio::supervisor.ping 2>/dev/null; then echo "... convert scripts to use environment variables instead of addon options" while IFS= read -r scripts do - sed -i -e 's/bashio::config.has_value[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"']/[ -n "${\1:-}" ]/g' \ - -e 's/bashio::config.true[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"']/[ -n "${\1:-}" ] \&\& [ "${\1:-}" = "true" ]/g' \ + 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' \ -e 's/\$(bashio::addon.port[[:space:]]*["'"'"']\([0-9]*\)["'"'"'])/${\1:-}/g' \ -e 's/bashio::config.require.ssl/true/g' \ @@ -74,7 +74,7 @@ if bashio::config.has_value "PUID" && bashio::config.has_value "PGID"; then PGID="$(bashio::config "PGID")" bashio::log.blue "User UID: $PUID" bashio::log.blue "User GID: $PGID" - + # Only modify user/group if they exist if id abc &>/dev/null; then usermod -o -u "$PUID" abc &>/dev/null @@ -82,7 +82,7 @@ if bashio::config.has_value "PUID" && bashio::config.has_value "PGID"; then if getent group abc &>/dev/null; then groupmod -o -g "$PGID" abc &>/dev/null fi - + bashio::log.blue \ '-----------------------------------------------------------' fi