Skip to content
Snippets Groups Projects
Commit f1977854 authored by Douwe Maan's avatar Douwe Maan
Browse files

Use sudu -u git where appropriate

parent d0420c68
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -92,7 +92,7 @@ In this example, we'll use the Gmail address `gitlab-replies@gmail.com`.
7. Check if everything is configured correctly:
 
```sh
sudo bundle exec rake gitlab:reply_by_email:check RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:reply_by_email:check RAILS_ENV=production
```
 
8. Reply by email should now be working.
Loading
Loading
Loading
Loading
@@ -595,7 +595,7 @@ namespace :gitlab do
else
puts "no".red
try_fixing_it(
sudo_gitlab("RAILS_ENV=production sudo -u git -H bin/background_jobs start")
sudo_gitlab("bin/background_jobs start", "RAILS_ENV=production")
)
for_more_information(
see_installation_guide_section("Install Init Script"),
Loading
Loading
@@ -726,7 +726,7 @@ namespace :gitlab do
else
puts "no".red
try_fixing_it(
sudo_gitlab("RAILS_ENV=production sudo -u git -H bin/mail_room start")
sudo_gitlab("bin/mail_room start", "RAILS_ENV=production")
)
for_more_information(
see_installation_guide_section("Install Init Script"),
Loading
Loading
@@ -879,8 +879,10 @@ namespace :gitlab do
"doc/install/installation.md in section \"#{section}\""
end
 
def sudo_gitlab(command)
"sudo -u #{gitlab_user} -H #{command}"
def sudo_gitlab(command, env = nil)
cmd = "sudo -u #{gitlab_user} -H #{command}"
cmd.prepend "#{env} " if env
cmd
end
 
def gitlab_user
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment