diff options
| author | Andrew Kane | 2011-09-21 02:25:13 -0700 |
|---|---|---|
| committer | Charlie Sharpsteen | 2011-09-23 18:21:27 -0700 |
| commit | ba2b6f3f11f45629d4c85c36cf4b589fe9d394c3 (patch) | |
| tree | aa6a26bf221ce9ac8a66172828e1f2ddbe4e634c /Library | |
| parent | 39540d8ded83205e1b4d982826b4492253770f87 (diff) | |
| download | homebrew-ba2b6f3f11f45629d4c85c36cf4b589fe9d394c3.tar.bz2 | |
New Formula: graylog2-server
Closes #7734.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/graylog2-server.rb | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Library/Formula/graylog2-server.rb b/Library/Formula/graylog2-server.rb new file mode 100644 index 000000000..a9e49d2a4 --- /dev/null +++ b/Library/Formula/graylog2-server.rb @@ -0,0 +1,47 @@ +require 'formula' + +class Graylog2Server < Formula + url 'https://github.com/downloads/Graylog2/graylog2-server/graylog2-server-0.9.5p1.tar.gz' + homepage 'http://www.graylog2.org/' + md5 '4b68488551c08bd80839a727319b1c98' + version '0.9.5p1' + + def install + mv "graylog2.conf.example", "graylog2.conf" + inreplace "graylog2.conf" do |s| + # Better to use 127.0.0.1 instead of localhost so you + # don't need to allow external access to MongoDB. + # http://www.eimermusic.com/code/graylog2-on-mac-os-x/ + s.gsub! "mongodb_host = localhost", "mongodb_host = 127.0.0.1" + s.gsub! "mongodb_useauth = true", "mongodb_useauth = false" + s.gsub! "syslog_listen_port = 514", "syslog_listen_port = 8514" + end + + inreplace "bin/graylog2ctl" do |s| + s.gsub! "$NOHUP java -jar ../graylog2-server.jar &", "$NOHUP java -DconfigPath=#{etc}/graylog2.conf -jar #{prefix}/graylog2-server.jar &" + end + + etc.install "graylog2.conf" + prefix.install Dir['*'] + end + + def caveats + <<-EOS.undent + In the interest of allowing you to run `graylog2ctl` + without `sudo`, the default port is set to 8514. + + To start graylog2-server: + graylog2ctl start + + To stop graylog2-server: + graylog2ctl stop + + The config file is located at: + #{etc}/graylog2.conf + EOS + end + + def test + system "#{bin}/graylog2ctl" + end +end |
