aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/collectd.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/Library/Formula/collectd.rb b/Library/Formula/collectd.rb
index 9e54b68df..338820864 100644
--- a/Library/Formula/collectd.rb
+++ b/Library/Formula/collectd.rb
@@ -34,4 +34,33 @@ class Collectd < Formula
system "./configure", *args
system "make install"
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>KeepAlive</key>
+ <true/>
+ <key>Label</key>
+ <string>#{plist_name}</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>#{sbin}/collectd</string>
+ <string>-f</string>
+ <string>-C</string>
+ <string>#{etc}/collectd.conf</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+ <key>UserName</key>
+ <string>#{`whoami`.chomp}</string>
+ <key>StandardErrorPath</key>
+ <string>/usr/local/var/log/collectd.log</string>
+ <key>StandardOutPath</key>
+ <string>/usr/local/var/log/collectd.log</string>
+ </dict>
+ </plist>
+ EOS
+ end
end