elasticsearch: persist plugins by changing config.

Closes Homebrew/homebrew#16629.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Douglas F Shearer 2012-12-17 23:04:06 +00:00 committed by Mike McQuaid
parent 51d62240bd
commit 5fbafaf436

View file

@ -31,6 +31,10 @@ class Elasticsearch < Formula
# 3. Bind to loopback IP for laptops roaming different networks
s.gsub! /#\s*network\.host\: [^\n]+/, "network.host: 127.0.0.1"
# 4. Persist plugins on upgrade
s.gsub! "# path.plugins: /path/to/plugins", "path.plugins: #{var}/lib/elasticsearch/plugins"
end
inreplace "#{bin}/elasticsearch.in.sh" do |s|
@ -49,11 +53,6 @@ class Elasticsearch < Formula
# Replace CLASSPATH paths to use libexec instead of lib
s.gsub! /-cp \".*\"/, '-cp "$ES_HOME/libexec/*"'
end
# Persist plugins on upgrade
plugins = "#{HOMEBREW_PREFIX}/var/lib/elasticsearch/plugins"
mkdir_p plugins
ln_sf plugins, "#{prefix}/plugins"
end
def caveats; <<-EOS.undent