summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-10-27 11:57:39 +0100
committerGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-10-27 11:57:39 +0100
commitb3a41ec1466774a10b1ef4d1b44c2234ec98c969 (patch)
tree7ae46684a1400d517c66192f278ecf302890294f /src
parent3b2c666b72d852c61e48b3a999ca4535298fc8a3 (diff)
Added handling of gid for git user also
Diffstat (limited to 'src')
-rwxr-xr-xsrc/init7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/init b/src/init
index 4c7e979..b29bfee 100755
--- a/src/init
+++ b/src/init
@@ -16,7 +16,7 @@ function checkUser
return $status
end
-function createUser
+function setupUser
set -l userConfig (string split ':' $argv[1])
set -l user $userConfig[1]
set -l key $userConfig[2]
@@ -47,7 +47,8 @@ function setupGitUser
echo "Setting up git user"
# git user has read/write access to all repos, set git-shell
# and no password login allowed -> no ssh login possible
- adduser git -u $GIT_UID -D --shell "/usr/bin/git-shell"
+ addgroup -g $GIT_GID git
+ adduser git -u $GIT_UID -G git -D --shell "/usr/bin/git-shell"
# group that is allowed to sudo
addgroup $_GIT_SUDO_GROUP
end
@@ -157,7 +158,7 @@ end
# Setup users
setupGitUser
for userConfig in $users
- createUser "$userConfig"
+ setupUser "$userConfig"
end
# Setup repos