Commit 36777f4ad32c90c34f13eab454292e041b72861b
Exists in
master
and in
4 other branches
Merge pull request #4204 from axilleas/initd_check-fix
Read init script recipe from Rails.root path. Fix #4174
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 | ... | ... |