kafka: audit fixes
This commit is contained in:
parent
44e3a70d45
commit
fdd9b23485
1 changed files with 29 additions and 29 deletions
|
@ -1,6 +1,6 @@
|
|||
class Kafka < Formula
|
||||
homepage "https://kafka.apache.org"
|
||||
desc "Publish-subscribe messaging rethought as a distributed commit log"
|
||||
homepage "https://kafka.apache.org"
|
||||
url "http://mirrors.ibiblio.org/apache/kafka/0.9.0.1/kafka-0.9.0.1-src.tgz"
|
||||
mirror "https://archive.apache.org/dist/kafka/0.9.0.1/kafka-0.9.0.1-src.tgz"
|
||||
sha256 "95d6bcb8fb1ee697b15c262dd9b61d0b47c7c9d1c8ece07205d4c2545ed12596"
|
||||
|
@ -52,7 +52,7 @@ class Kafka < Formula
|
|||
|
||||
prefix.install "bin"
|
||||
bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.7+"))
|
||||
Dir["#{bin}/*.sh"].each {|f| mv f, f.to_s.gsub(/.sh$/, "") }
|
||||
Dir["#{bin}/*.sh"].each { |f| mv f, f.to_s.gsub(/.sh$/, "") }
|
||||
|
||||
mv "config", "kafka"
|
||||
etc.install "kafka"
|
||||
|
@ -64,6 +64,33 @@ class Kafka < Formula
|
|||
|
||||
plist_options :manual => "zookeeper-server-start #{HOMEBREW_PREFIX}/etc/kafka/zookeeper.properties; kafka-server-start #{HOMEBREW_PREFIX}/etc/kafka/server.properties"
|
||||
|
||||
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>Label</key>
|
||||
<string>#{plist_name}</string>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>#{HOMEBREW_PREFIX}</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>#{opt_bin}/kafka-server-start</string>
|
||||
<string>#{etc}/kafka/server.properties</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>#{var}/log/kafka/kafka_output.log</string>
|
||||
<key>StandardOutPath</key>
|
||||
<string>#{var}/log/kafka/kafka_output.log</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
ENV["LOG_DIR"] = "#{testpath}/kafkalog"
|
||||
|
||||
|
@ -97,31 +124,4 @@ class Kafka < Formula
|
|||
|
||||
assert_match "Received message: ", IO.read("#{testpath}/kafka/demo.out")
|
||||
end
|
||||
|
||||
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>Label</key>
|
||||
<string>#{plist_name}</string>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>#{HOMEBREW_PREFIX}</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>#{opt_bin}/kafka-server-start</string>
|
||||
<string>#{etc}/kafka/server.properties</string>
|
||||
</array>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
<true/>
|
||||
<key>StandardErrorPath</key>
|
||||
<string>#{var}/log/kafka/kafka_output.log</string>
|
||||
<key>StandardOutPath</key>
|
||||
<string>#{var}/log/kafka/kafka_output.log</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue