Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit 7ea2eda

Browse files
committed
Merge pull request #14 from Ledej/fix-update-elasticsearch
Fix the elasticsearch 1.1.0 update
2 parents fa2a123 + 5dc94ec commit 7ea2eda

File tree

1 file changed

+0
-62
lines changed

1 file changed

+0
-62
lines changed

files/brews/elasticsearch.rb

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,6 @@ def install
4141
rm_rf "#{prefix}/target/"
4242
end
4343

44-
# Set up Elasticsearch for local development:
45-
inreplace "#{prefix}/config/elasticsearch.yml" do |s|
46-
# 1. Give the cluster a unique name
47-
s.gsub! /#\s*cluster\.name\: elasticsearch/, "cluster.name: #{cluster_name}"
48-
49-
# 2. Configure paths
50-
s.sub! "# path.data: /path/to/data", "path.data: #{var}/elasticsearch/"
51-
s.sub! "# path.logs: /path/to/logs", "path.logs: #{var}/log/elasticsearch/"
52-
s.sub! "# path.plugins: /path/to/plugins", "path.plugins: #{var}/lib/elasticsearch/plugins"
53-
54-
# 3. Bind to loopback IP for laptops roaming different networks
55-
s.gsub! /#\s*network\.host\: [^\n]+/, "network.host: 127.0.0.1"
56-
end
57-
5844
inreplace "#{bin}/elasticsearch.in.sh" do |s|
5945
# Configure ES_HOME
6046
s.sub! /#\!\/bin\/sh\n/, "#!/bin/sh\n\nES_HOME=#{prefix}"
@@ -69,52 +55,4 @@ def install
6955
s.gsub! /\$ES_HOME\/lib\//, "$ES_CLASSPATH/"
7056
end
7157
end
72-
73-
def post_install
74-
# Make sure runtime directories exist
75-
(var/"elasticsearch/#{cluster_name}").mkpath
76-
(var/"log/elasticsearch").mkpath
77-
(var/"lib/elasticsearch/plugins").mkpath
78-
end
79-
80-
def caveats; <<-EOS.undent
81-
Data: #{var}/elasticsearch/#{cluster_name}/
82-
Logs: #{var}/log/elasticsearch/#{cluster_name}.log
83-
Plugins: #{var}/lib/elasticsearch/plugins/
84-
EOS
85-
end
86-
87-
plist_options :manual => "elasticsearch --config=#{HOMEBREW_PREFIX}/opt/elasticsearch/config/elasticsearch.yml"
88-
89-
def plist; <<-EOS.undent
90-
<?xml version="1.0" encoding="UTF-8"?>
91-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
92-
<plist version="1.0">
93-
<dict>
94-
<key>KeepAlive</key>
95-
<true/>
96-
<key>Label</key>
97-
<string>#{plist_name}</string>
98-
<key>ProgramArguments</key>
99-
<array>
100-
<string>#{HOMEBREW_PREFIX}/bin/elasticsearch</string>
101-
<string>--config=#{prefix}/config/elasticsearch.yml</string>
102-
</array>
103-
<key>EnvironmentVariables</key>
104-
<dict>
105-
<key>ES_JAVA_OPTS</key>
106-
<string>-Xss200000</string>
107-
</dict>
108-
<key>RunAtLoad</key>
109-
<true/>
110-
<key>WorkingDirectory</key>
111-
<string>#{var}</string>
112-
<key>StandardErrorPath</key>
113-
<string>/dev/null</string>
114-
<key>StandardOutPath</key>
115-
<string>/dev/null</string>
116-
</dict>
117-
</plist>
118-
EOS
119-
end
12058
end

0 commit comments

Comments
 (0)