summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-06 08:20:58 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-06 08:20:58 -0700
commit36777f4ad32c90c34f13eab454292e041b72861b (patch)
tree5c145f01c72f50cfc679162c937973e9acc20313
parent32abda6c5d1134ce43cb5e0ef00c62b6eb0d026e (diff)
parentff7e80804317373f14a6bc96374d9bd052b604e9 (diff)
downloadgitlab-ce-36777f4ad32c90c34f13eab454292e041b72861b.tar.gz
Merge pull request #4204 from axilleas/initd_check-fix
Read init script recipe from Rails.root path. Fix #4174
-rw-r--r--lib/tasks/gitlab/check.rake4
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