zookeeper: add launchd plist
This commit is contained in:
parent
f20916802d
commit
368cd4bb09
1 changed files with 28 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue