elasticsearch: make postinstall rerunnable

This commit is contained in:
Misty De Meo 2019-02-20 12:30:05 -08:00 committed by Misty De Meo
parent 776efae04d
commit de68c83e4b

View file

@ -64,9 +64,9 @@ class Elasticsearch < Formula
# Make sure runtime directories exist
(var/"lib/elasticsearch/#{cluster_name}").mkpath
(var/"log/elasticsearch").mkpath
ln_s etc/"elasticsearch", libexec/"config"
ln_s etc/"elasticsearch", libexec/"config" unless (libexec/"config").exist?
(var/"elasticsearch/plugins").mkpath
ln_s var/"elasticsearch/plugins", libexec/"plugins"
ln_s var/"elasticsearch/plugins", libexec/"plugins" unless (libexec/"plugins").exist?
# fix test not being able to create keystore because of sandbox permissions
system bin/"elasticsearch-keystore", "create" unless (etc/"elasticsearch/elasticsearch.keystore").exist?
end