From 6a5a8c8c4dfaa423a7089401e4ce4cd544d4ff6c Mon Sep 17 00:00:00 2001 From: "Kai T. Ohlhus" Date: Wed, 16 Oct 2024 08:11:15 +0900 Subject: [PATCH] install.sh: improve --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index ab3277d..a7f27c3 100755 --- a/install.sh +++ b/install.sh @@ -256,8 +256,8 @@ function get_docker_entrypoint() # User is resolved during installation. # Entrypoint is executed inside running container. -groupadd -g $(id -g) -f $(id -gn) -useradd -g $(id -g) -u $(id -u) -G sudo $(id -un) +groupadd -g $(id -g) $(id -gn) 2> /dev/null || groupmod -n $(id -gn) ubuntu +useradd -g $(id -g) -u $(id -u) -G sudo $(id -un) 2> /dev/null || usermod -l $(id -un) ubuntu echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers CMD=\${1##*/} shift