Commit ff7e80804317373f14a6bc96374d9bd052b604e9

Authored by Axilleas Pipinellis
1 parent b9d989dc

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

Signed-off-by: Axilleas Pipinellis <axilleas@archlinux.gr>
Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
lib/tasks/gitlab/check.rake
... ... @@ -138,13 +138,15 @@ namespace :gitlab do
138 138 def check_init_script_up_to_date
139 139 print "Init script up-to-date? ... "
140 140  
  141 + recipe_path = Rails.root.join("lib/support/init.d/", "gitlab")
141 142 script_path = "/etc/init.d/gitlab"
  143 +
142 144 unless File.exists?(script_path)
143 145 puts "can't check because of previous errors".magenta
144 146 return
145 147 end
146 148  
147   - recipe_content = `curl https://raw.github.com/gitlabhq/gitlab-recipes/master/init.d/gitlab 2>/dev/null`
  149 + recipe_content = File.read(recipe_path)
148 150 script_content = File.read(script_path)
149 151  
150 152 if recipe_content == script_content
... ...