From 1febd9a198d4f043b853523d1910ea75a8508f17 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:04:07 +0200 Subject: [PATCH] Improve --- .templates/00-smb_mounts.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.templates/00-smb_mounts.sh b/.templates/00-smb_mounts.sh index af25b24da..6279ab1a0 100755 --- a/.templates/00-smb_mounts.sh +++ b/.templates/00-smb_mounts.sh @@ -36,23 +36,21 @@ if bashio::config.has_value 'networkdisks'; then MOREDISKS=${MOREDISKS// /"\040"} # Is domain set + DOMAIN="" + DOMAINCLIENT="" if bashio::config.has_value 'cifsdomain'; then echo "... using domain $(bashio::config 'cifsdomain')" DOMAIN=",domain=$(bashio::config 'cifsdomain')" DOMAINCLIENT=",--workgroup=$(bashio::config 'cifsdomain')" - else - DOMAIN="" - DOMAINCLIENT="" fi # Is UID/GID set - if bashio::config.has_value 'PUID' && bashio::config.has_value 'PGID' && [ -z ${ROOTMOUNT+x} ]; then + PUID=",uid=$(id -u)" + PGID=",gid=$(id -g)" + if bashio::config.has_value 'PUID' && bashio::config.has_value 'PGID'; then echo "... using PUID $(bashio::config 'PUID') and PGID $(bashio::config 'PGID')" PUID=",uid=$(bashio::config 'PUID')" PGID=",gid=$(bashio::config 'PGID')" - else - PUID=",uid=$(id -u)" - PGID=",gid=$(id -g)" fi ##################