diff options
author | Axilleas Pipinellis <axilleas@archlinux.gr> | 2013-06-05 01:11:43 +0300 |
---|---|---|
committer | Axilleas Pipinellis <axilleas@archlinux.gr> | 2013-06-05 01:23:28 +0300 |
commit | ff7e80804317373f14a6bc96374d9bd052b604e9 (patch) | |
tree | 95936df787ec3a059e8858d0f20967b1cb238d1e | |
parent | b9d989dc056a2a2b9316ff9aa06b57c736426871 (diff) | |
download | gitlab-ce-ff7e80804317373f14a6bc96374d9bd052b604e9.tar.gz |
Read init script recipe from Rails.root path. Fix #4174
Signed-off-by: Axilleas Pipinellis <axilleas@archlinux.gr>
-rw-r--r-- | lib/tasks/gitlab/check.rake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 59c2449444a..38e8e367904 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -138,13 +138,15 @@ namespace :gitlab do def check_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" + unless File.exists?(script_path) puts "can't check because of previous errors".magenta return 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) if recipe_content == script_content |