From 201f3573346e26a95963d44814693b8dff95ddde Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 11 Feb 2026 14:33:01 +0100 Subject: [PATCH] Update 00-banner.sh --- .templates/00-banner.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.templates/00-banner.sh b/.templates/00-banner.sh index f452b81e6..31e1280d2 100755 --- a/.templates/00-banner.sh +++ b/.templates/00-banner.sh @@ -43,15 +43,12 @@ bashio::log.blue '-----------------------------------------------------------' bashio::log.green ' Provided by: https://github.com/alexbelgium/hassio-addons ' bashio::log.blue '-----------------------------------------------------------' -# ====================================================================== -# UID/GID logic stays unchanged -# ====================================================================== - -if bashio::config.has_value "PUID" && bashio::config.has_value "PGID" && id abc &>/dev/null; then - PUID="$(bashio::config "PUID")" - PGID="$(bashio::config "PGID")" - usermod -o -u "$PUID" abc - groupmod -o -g "$PGID" abc +# Adapt user abc +if command -v id &>/dev/null && id abc &>/dev/null; then + if bashio::config.has_value "PUID" && bashio::config.has_value "PGID"; then + PUID="$(bashio::config "PUID")" + PGID="$(bashio::config "PGID")" + usermod -o -u "${PUID:-0}" abc + groupmod -o -g "${PGID:-0}" abc + fi fi - -[ -f ~/.bashrc ] && : > ~/.bashrc