aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Krogemann2015-02-21 21:42:17 +0100
committerMike McQuaid2015-02-22 15:48:22 +0000
commitf00dd6af608dd2c928ae23bda54583fb0eda75e9 (patch)
treec05068e0012bbdaa6770a0ed557099ddd846bf61
parente0bdc7a5afa653d48353e7022de676c68dd2ecb5 (diff)
downloadhomebrew-f00dd6af608dd2c928ae23bda54583fb0eda75e9.tar.bz2
elasticsearch: move config files into etc.
To persist them over upgrade. Closes #37037. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/elasticsearch.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Formula/elasticsearch.rb b/Library/Formula/elasticsearch.rb
index ee726438f..6d5f91051 100644
--- a/Library/Formula/elasticsearch.rb
+++ b/Library/Formula/elasticsearch.rb
@@ -68,6 +68,10 @@ class Elasticsearch < Formula
# Replace paths to use libexec instead of lib
s.gsub!(%r{\$ES_HOME/lib/}, "$ES_CLASSPATH/")
end
+
+ # Move config files into etc
+ (etc/"elasticsearch").install Dir[prefix/"config/*"]
+ (prefix/"config").rmtree
end
def post_install
@@ -75,12 +79,14 @@ class Elasticsearch < Formula
(var/"elasticsearch/#{cluster_name}").mkpath
(var/"log/elasticsearch").mkpath
(var/"lib/elasticsearch/plugins").mkpath
+ ln_s etc/"elasticsearch", prefix/"config"
end
def caveats; <<-EOS.undent
Data: #{var}/elasticsearch/#{cluster_name}/
Logs: #{var}/log/elasticsearch/#{cluster_name}.log
Plugins: #{var}/lib/elasticsearch/plugins/
+ Config: #{etc}/elasticsearch/
EOS
end