diff options
Diffstat (limited to 'Library/Formula/elasticsearch.rb')
| -rw-r--r-- | Library/Formula/elasticsearch.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Library/Formula/elasticsearch.rb b/Library/Formula/elasticsearch.rb index 358d1d183..069c61571 100644 --- a/Library/Formula/elasticsearch.rb +++ b/Library/Formula/elasticsearch.rb @@ -48,24 +48,24 @@ class Elasticsearch < Formula end # Write .plist file for `launchd` - (prefix+'org.elasticsearch.plist').write startup_plist - (prefix+'org.elasticsearch.plist').chmod 0644 + plist_path.write startup_plist + plist_path.chmod 0644 end def caveats <<-EOS.undent If this is your first install, automatically load ElasticSearch on login with: mkdir -p ~/Library/LaunchAgents - ln -nfs #{prefix}/org.elasticsearch.plist ~/Library/LaunchAgents/ - launchctl load -wF ~/Library/LaunchAgents/org.elasticsearch.plist + ln -nfs #{plist_path} ~/Library/LaunchAgents/ + launchctl load -wF ~/Library/LaunchAgents/#{plist_path.basename} - If this is an upgrade and you already have the org.elasticsearch.plist loaded: - launchctl unload -w ~/Library/LaunchAgents/org.elasticsearch.plist - ln -nfs #{prefix}/org.elasticsearch.plist ~/Library/LaunchAgents/ - launchctl load -wF ~/Library/LaunchAgents/org.elasticsearch.plist + If this is an upgrade and you already have the #{plist_path} loaded: + launchctl unload -w ~/Library/LaunchAgents/#{plist_path.basename} + ln -nfs #{plist_path} ~/Library/LaunchAgents/ + launchctl load -wF ~/Library/LaunchAgents/#{plist_path.basename} To stop the ElasticSearch daemon: - launchctl unload -wF ~/Library/LaunchAgents/org.elasticsearch.plist + launchctl unload -wF ~/Library/LaunchAgents/#{plist_path.basename} To start ElasticSearch manually: elasticsearch -f -D es.config=#{prefix}/config/elasticsearch.yml @@ -93,7 +93,7 @@ class Elasticsearch < Formula <key>KeepAlive</key> <true/> <key>Label</key> - <string>org.elasticsearch</string> + <string>#{plist_name}</string> <key>ProgramArguments</key> <array> <string>#{HOMEBREW_PREFIX}/bin/elasticsearch</string> |
