diff options
| author | 2025-10-27 11:57:39 +0100 | |
|---|---|---|
| committer | 2025-10-27 11:57:39 +0100 | |
| commit | b3a41ec1466774a10b1ef4d1b44c2234ec98c969 (patch) | |
| tree | 7ae46684a1400d517c66192f278ecf302890294f /src | |
| parent | 3b2c666b72d852c61e48b3a999ca4535298fc8a3 (diff) | |
Added handling of gid for git user also
Diffstat (limited to 'src')
| -rwxr-xr-x | src/init | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |
