Skip to content
Snippets Groups Projects
Commit f0c6f19b7ee8 authored by DJ Mountney's avatar DJ Mountney
Browse files

Merge branch '6167-move-gitlab-rails-rc-location' into 'master'

Move gitlab-rails-rc to more secure location

Closes #6167

See merge request gitlab-org/omnibus-gitlab!5421
3 merge requests!51Validate shift of Heptapod 0.25 to oldstable series,!47Making Heptapod 0.25 the new stable in Omnibus,!45GitLab 14.2
......@@ -17,7 +17,7 @@
echo "$1" 2>& 1
}
gitlab_rails_rc='<%= install_dir %>/etc/gitlab-rails/gitlab-rails-rc'
gitlab_rails_rc='<%= install_dir %>/etc/gitlab-rails-rc'
if ! [ -f ${gitlab_rails_rc} ] ; then
error_echo "$0 error: could not load ${gitlab_rails_rc}"
error_echo "Either you are not allowed to read the file, or it does not exist yet."
......
......@@ -113,7 +113,7 @@
}
# Load gitlab-rails-rc
gitlab_rails_rc='<%= install_dir %>/etc/gitlab-rails/gitlab-rails-rc'
gitlab_rails_rc='<%= install_dir %>/etc/gitlab-rails-rc'
if ! [ -f ${gitlab_rails_rc} ] ; then
>&2 echo "${0} error: could not load ${gitlab_rails_rc}"
>&2 echo 'Either you are not allowed to read the file, or it does not exist yet.'
......
......@@ -135,7 +135,18 @@
sensitive true
end
template File.join(gitlab_rails_static_etc_dir, "gitlab-rails-rc")
template '/opt/gitlab/etc/gitlab-rails-rc' do
owner 'root'
group 'root'
mode '0600'
sensitive true
end
# TODO: Delete in GitLab 15.0
# https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6240
file File.join(gitlab_rails_static_etc_dir, "gitlab-rails-rc") do
action :delete
end
dependent_services = []
dependent_services << "runit_service[mailroom]" if node['gitlab']['mailroom']['enable']
......
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