diff --git a/config/software/gitlab-core.rb b/config/software/gitlab-core.rb index 70069bd..1e55167 100644 --- a/config/software/gitlab-core.rb +++ b/config/software/gitlab-core.rb @@ -64,5 +64,5 @@ build do erb :dest => "#{install_dir}/bin/gitlab-rake", :source => "bundle_exec_wrapper.erb", :mode => 0755, - :vars => {:command => 'rake "$@"'} + :vars => {:command => 'rake "$@"', :install_dir => install_dir} end diff --git a/config/templates/gitlab-core/bundle_exec_wrapper.erb b/config/templates/gitlab-core/bundle_exec_wrapper.erb index deb2c1b..4080d62 100644 --- a/config/templates/gitlab-core/bundle_exec_wrapper.erb +++ b/config/templates/gitlab-core/bundle_exec_wrapper.erb @@ -1,12 +1,12 @@ #!/bin/bash -export PATH=/opt/gitlab/bin:/opt/gitlab/embedded/bin:$PATH +export PATH=<%= @install_dir %>/bin:<%= @install_dir %>/embedded/bin:$PATH # default to RAILS_ENV=production if [[ -z $RAILS_ENV ]]; then export RAILS_ENV=production fi -gitlab_user=$(ls -lLd /opt/gitlab/embedded/service/gitlab-core/log | awk '{ print $3 }') +gitlab_user=$(ls -lLd <%= @install_dir %>/embedded/service/gitlab-core/log | awk '{ print $3 }') -cd /opt/gitlab/embedded/service/gitlab-core -/opt/gitlab/embedded/bin/chpst -u $gitlab_user -U $gitlab_user /opt/gitlab/embedded/bin/bundle exec <%= @command %> +cd <%= @install_dir %>/embedded/service/gitlab-core +<%= @install_dir %>/embedded/bin/chpst -u $gitlab_user -U $gitlab_user <%= @install_dir %>/embedded/bin/bundle exec <%= @command %> -- libgit2 0.21.2