znc: add launchd plist

Closes Homebrew/homebrew#24603.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Wil Moore III 2013-11-22 17:02:13 -07:00 committed by Adam Vandenberg
parent 092a982745
commit 7e0b03154b

View file

@ -25,4 +25,31 @@ class Znc < Formula
system "./configure", *args
system "make install"
end
plist_options :manual => "znc --foreground"
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>ProgramArguments</key>
<array>
<string>#{bin}/znc</string>
<string>--foreground</string>
</array>
<key>StandardErrorPath</key>
<string>#{var}/log/znc.log</string>
<key>StandardOutPath</key>
<string>#{var}/log/znc.log</string>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>300</integer>
</dict>
</plist>
EOS
end
end