elasticsearch: move config files into etc.
To persist them over upgrade. Closes Homebrew/homebrew#37037. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
119bda48a8
commit
eded806df9
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue