Commit ff7e80804317373f14a6bc96374d9bd052b604e9
1 parent
b9d989dc
Exists in
master
and in
4 other branches
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,13 +138,15 @@ namespace :gitlab do | ||
138 | def check_init_script_up_to_date | 138 | def check_init_script_up_to_date |
139 | print "Init script up-to-date? ... " | 139 | print "Init script up-to-date? ... " |
140 | 140 | ||
141 | + recipe_path = Rails.root.join("lib/support/init.d/", "gitlab") | ||
141 | script_path = "/etc/init.d/gitlab" | 142 | script_path = "/etc/init.d/gitlab" |
143 | + | ||
142 | unless File.exists?(script_path) | 144 | unless File.exists?(script_path) |
143 | puts "can't check because of previous errors".magenta | 145 | puts "can't check because of previous errors".magenta |
144 | return | 146 | return |
145 | end | 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 | script_content = File.read(script_path) | 150 | script_content = File.read(script_path) |
149 | 151 | ||
150 | if recipe_content == script_content | 152 | if recipe_content == script_content |