Commit d68b16d1da8549bd55b1d122f054eaf690819afe
1 parent
cdb91575
Exists in
master
and in
17 other branches
Also create the log directory for gitlab-shell
Showing
2 changed files
with
7 additions
and
2 deletions
Show diff stats
files/gitlab-cookbooks/gitlab/recipes/gitlab-shell.rb
| ... | ... | @@ -3,6 +3,7 @@ git_group = node['gitlab']['user']['group'] |
| 3 | 3 | gitlab_shell_dir = "/opt/gitlab/embedded/service/gitlab-shell" |
| 4 | 4 | repositories_path = node['gitlab']['gitlab-core']['repositories_path'] |
| 5 | 5 | ssh_dir = File.join(node['gitlab']['user']['home'], ".ssh") |
| 6 | +log_directory = node['gitlab']['gitlab-shell']['log_directory'] | |
| 6 | 7 | |
| 7 | 8 | # Create directories because the git_user does not own its home directory |
| 8 | 9 | directory repositories_path do |
| ... | ... | @@ -16,6 +17,10 @@ directory ssh_dir do |
| 16 | 17 | mode "0700" |
| 17 | 18 | end |
| 18 | 19 | |
| 20 | +directory log_directory do | |
| 21 | + owner git_user | |
| 22 | +end | |
| 23 | + | |
| 19 | 24 | template File.join(gitlab_shell_dir, "config.yml") do |
| 20 | 25 | source "gitlab-shell-config.yml.erb" |
| 21 | 26 | owner git_user |
| ... | ... | @@ -26,7 +31,7 @@ template File.join(gitlab_shell_dir, "config.yml") do |
| 26 | 31 | :repositories_path => repositories_path, |
| 27 | 32 | :ssh_dir => ssh_dir, |
| 28 | 33 | :redis_port => node['gitlab']['redis']['port'], |
| 29 | - :log_directory => node['gitlab']['gitlab-shell']['log_directory'] | |
| 34 | + :log_file => File.join(log_directory, "gitlab-shell.log") | |
| 30 | 35 | ) |
| 31 | 36 | notifies :run, "execute[bin/install]" |
| 32 | 37 | end | ... | ... |
files/gitlab-cookbooks/gitlab/templates/default/gitlab-shell-config.yml.erb