summaryrefslogtreecommitdiff
path: root/src/init
diff options
context:
space:
mode:
Diffstat (limited to 'src/init')
-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