Commit ff7e8080 authored by Axilleas Pipinellis's avatar Axilleas Pipinellis

Read init script recipe from Rails.root path. Fix #4174

Signed-off-by: default avatarAxilleas Pipinellis <axilleas@archlinux.gr>
parent b9d989dc
...@@ -138,13 +138,15 @@ namespace :gitlab do ...@@ -138,13 +138,15 @@ namespace :gitlab do
def check_init_script_up_to_date def check_init_script_up_to_date
print "Init script up-to-date? ... " print "Init script up-to-date? ... "
recipe_path = Rails.root.join("lib/support/init.d/", "gitlab")
script_path = "/etc/init.d/gitlab" script_path = "/etc/init.d/gitlab"
unless File.exists?(script_path) unless File.exists?(script_path)
puts "can't check because of previous errors".magenta puts "can't check because of previous errors".magenta
return return
end end
recipe_content = `curl https://raw.github.com/gitlabhq/gitlab-recipes/master/init.d/gitlab 2>/dev/null` recipe_content = File.read(recipe_path)
script_content = File.read(script_path) script_content = File.read(script_path)
if recipe_content == script_content if recipe_content == script_content
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment