aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/elasticsearch.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/elasticsearch.rb')
-rw-r--r--Library/Formula/elasticsearch.rb27
1 files changed, 5 insertions, 22 deletions
diff --git a/Library/Formula/elasticsearch.rb b/Library/Formula/elasticsearch.rb
index 150b46746..992f2b300 100644
--- a/Library/Formula/elasticsearch.rb
+++ b/Library/Formula/elasticsearch.rb
@@ -51,28 +51,11 @@ class Elasticsearch < Formula
end
end
- def caveats
- <<-EOS.undent
- If this is your first install, automatically load ElasticSearch on login with:
- mkdir -p ~/Library/LaunchAgents
- ln -nfs #{plist_path} ~/Library/LaunchAgents/
- launchctl load -wF ~/Library/LaunchAgents/#{plist_path.basename}
-
- If this is an upgrade and you already have the #{plist_path.basename} loaded:
- launchctl unload -w ~/Library/LaunchAgents/#{plist_path.basename}
- ln -nfs #{plist_path} ~/Library/LaunchAgents/
- launchctl load -wF ~/Library/LaunchAgents/#{plist_path.basename}
-
+ def caveats; <<-EOS.undent
If upgrading from 0.18 ElasticSearch requires flushing before shutting
down the cluster with no indexing operations happening after flush:
curl host:9200/_flush
- To stop the ElasticSearch daemon:
- launchctl unload -wF ~/Library/LaunchAgents/#{plist_path.basename}
-
- To start ElasticSearch manually:
- elasticsearch -f -D es.config=#{prefix}/config/elasticsearch.yml
-
See the 'elasticsearch.yml' file for configuration options.
You'll find the ElasticSearch log here:
@@ -83,12 +66,12 @@ class Elasticsearch < Formula
You should see ElasticSearch running:
open http://localhost:9200/
-
EOS
end
- def startup_plist
- <<-PLIST.undent
+ plist_options :manual => "elasticsearch -f -D es.config=#{HOMEBREW_PREFIX}/opt/elasticsearch/config/elasticsearch.yml"
+
+ def plist; <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@@ -120,6 +103,6 @@ class Elasticsearch < Formula
<string>/dev/null</string>
</dict>
</plist>
- PLIST
+ EOS
end
end