diff options
| author | Sveinn Fannar Kristjansson | 2014-04-14 21:34:23 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-04-15 08:12:38 +0100 |
| commit | a5ac42c1a1ac70caf6b3f7bac937a28eb519b9e0 (patch) | |
| tree | e562049ce6f3fa0af6e2c869f99d39bb10a1121a /Library/Formula/zookeeper.rb | |
| parent | 6e231909b81ec6d1e1ae55e6c6762bcee46fe235 (diff) | |
| download | homebrew-a5ac42c1a1ac70caf6b3f7bac937a28eb519b9e0.tar.bz2 | |
zookeeper: add launchd plist
Diffstat (limited to 'Library/Formula/zookeeper.rb')
| -rw-r--r-- | Library/Formula/zookeeper.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Library/Formula/zookeeper.rb b/Library/Formula/zookeeper.rb index 8ec9a6c4b..b180a4cad 100644 --- a/Library/Formula/zookeeper.rb +++ b/Library/Formula/zookeeper.rb @@ -120,4 +120,32 @@ class Zookeeper < Formula cp 'conf/zoo_sample.cfg', 'conf/zoo.cfg' (etc/'zookeeper').install ['conf/zoo.cfg', 'conf/zoo_sample.cfg'] end + + plist_options :manual => "zkServer start" + + 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"> + <dict> + <key>KeepAlive</key> + <dict> + <key>SuccessfulExit</key> + <false/> + </dict> + <key>Label</key> + <string>#{plist_name}</string> + <key>ProgramArguments</key> + <array> + <string>#{opt_bin}/zkServer</string> + <string>start-foreground</string> + </array> + <key>RunAtLoad</key> + <true/> + <key>WorkingDirectory</key> + <string>#{var}</string> + </dict> + </plist> + EOS + end end |
