aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/elasticsearch.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/Library/Formula/elasticsearch.rb b/Library/Formula/elasticsearch.rb
index 6cd379ea8..be793085c 100644
--- a/Library/Formula/elasticsearch.rb
+++ b/Library/Formula/elasticsearch.rb
@@ -39,11 +39,6 @@ class Elasticsearch < Formula
rm_rf "#{prefix}/target/"
end
- # Make sure runtime directories exist
- (var/"elasticsearch/#{cluster_name}").mkpath
- (var/"log/elasticsearch").mkpath
- (var/"lib/elasticsearch/plugins").mkpath
-
# Set up ElasticSearch for local development:
inreplace "#{prefix}/config/elasticsearch.yml" do |s|
# 1. Give the cluster a unique name
@@ -73,6 +68,13 @@ class Elasticsearch < Formula
end
end
+ def post_install
+ # Make sure runtime directories exist
+ (var/"elasticsearch/#{cluster_name}").mkpath
+ (var/"log/elasticsearch").mkpath
+ (var/"lib/elasticsearch/plugins").mkpath
+ end
+
def caveats; <<-EOS.undent
Data: #{var}/elasticsearch/#{cluster_name}/
Logs: #{var}/log/elasticsearch/#{cluster_name}.log