diff options
| author | Mike McQuaid | 2012-11-25 15:06:41 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2012-11-25 23:05:52 +0000 |
| commit | 5825f62337c087897ae255a92ad94619a1dd1981 (patch) | |
| tree | d8e4885a3b5c8b00fc3ceae3969cf5df4354881c /Library/Formula/elasticsearch.rb | |
| parent | 6dc4678ad3e88918e3b47da5d8b09b2e4677012c (diff) | |
| download | homebrew-5825f62337c087897ae255a92ad94619a1dd1981.tar.bz2 | |
Make generic caveats for launchd plist files.
Diffstat (limited to 'Library/Formula/elasticsearch.rb')
| -rw-r--r-- | Library/Formula/elasticsearch.rb | 27 |
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 |
