uptimed: add plist
Closes Homebrew/homebrew#42358. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
cd08397a56
commit
20e60e5b73
1 changed files with 25 additions and 0 deletions
|
@ -20,6 +20,31 @@ class Uptimed < Formula
|
|||
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>Label</key>
|
||||
<string>#{plist_name}</string>
|
||||
<key>RunAtLoad</key>
|
||||
<true/>
|
||||
<key>KeepAlive</key>
|
||||
<false/>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>#{opt_prefix}</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>#{opt_sbin}/uptimed</string>
|
||||
<string>-f</string>
|
||||
<string>-p</string>
|
||||
<string>#{var}/run/uptimed.pid</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/uprecords"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue