aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Jørgensen2014-10-12 01:21:27 +0200
committerJack Nagel2014-10-12 22:26:48 -0500
commitd3b069bba7fb8f58f816ef44f9d5ceaa0fa584a7 (patch)
tree7de8a0b91a24192543ceba4f5d69e284654ecd56
parent120bf8d96c49ff9aeb612c62251336a63f90c249 (diff)
downloadhomebrew-d3b069bba7fb8f58f816ef44f9d5ceaa0fa584a7.tar.bz2
solr: add startup plist
Added a plist startup like was previously done in [solr36](https://github.com/Homebrew/homebrew-versions/commit/4fa8b9b3c8f37667f1d993a53a6b9da383d87179) at Homebrew/homebrew-versions#366. Closes #32069. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
-rw-r--r--Library/Formula/solr.rb27
1 files changed, 22 insertions, 5 deletions
diff --git a/Library/Formula/solr.rb b/Library/Formula/solr.rb
index e646fbe76..962ed85fd 100644
--- a/Library/Formula/solr.rb
+++ b/Library/Formula/solr.rb
@@ -19,12 +19,29 @@ class Solr < Formula
prefix.install "#{libexec}/example"
end
- def caveats; <<-EOS.undent
- To start solr:
- solr /absolute/path/to/solr/config/dir
+ plist_options :manual => "solr start"
- See the solr homepage for more setup information:
- brew home solr
+ def plist; <<-EOS.undent
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+ <plist version="1.0">
+ <dict>
+ <key>Label</key>
+ <string>#{plist_name}</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>#{opt_bin}/solr</string>
+ <string>start</string>
+ <string>-f</string>
+ </array>
+ <key>ServiceDescription</key>
+ <string>#{name}</string>
+ <key>WorkingDirectory</key>
+ <string>#{HOMEBREW_PREFIX}</string>
+ <key>RunAtLoad</key>
+ <true/>
+ </dict>
+ </plist>
EOS
end
end