diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2013-01-16 23:20:47 +0100 |
---|---|---|
committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2013-01-16 23:20:47 +0100 |
commit | eea43c9412fcf1ce8de0230524114b2d643a0e0e (patch) | |
tree | 8ee2b88cdbc17a0f79256e4034b82a9173123592 /lib | |
parent | 9bc829d3975d70b3a7639a965aa8fbd7ee1f047f (diff) | |
parent | 471b5910a64d5cbfe268caf210c1745cf3e8fefd (diff) | |
download | gitlab-ce-eea43c9412fcf1ce8de0230524114b2d643a0e0e.tar.gz |
Merge branch 'check_gitlab_in_git_group' of https://github.com/VonC/gitlabhq into VonC-check_gitlab_in_git_group
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/gitlab/check.rake | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 623028b16d2..3d9c9f4c2df 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -295,15 +295,16 @@ namespace :gitlab do end def check_gitlab_in_git_group - gitolite_ssh_user = Gitlab.config.gitolite.ssh_user - print "gitlab user is in #{gitolite_ssh_user} group? ... " + gitlab_user = Gitlab.config.gitlab.user + gitolite_group = Gitlab.config.gitolite.group + print "gitlab user '#{gitlab_user}' has git group '#{gitolite_group}'? ... " - if run_and_match("id -rnG", /\Wgit\W/) + if run_and_match("id -rnG", /^#{gitolite_group}\W|\W#{gitolite_group}\W|\W#{gitolite_group}$/) puts "yes".green else puts "no".red try_fixing_it( - "sudo usermod -a -G #{gitolite_ssh_user} gitlab" + "sudo usermod -a -G #{gitolite_group} #{gitlab_user}" ) for_more_information( see_installation_guide_section "System Users" |