Permalink
Browse files

daemontools: add plist.

  • Loading branch information...
Songmu authored and MikeMcQuaid committed Nov 6, 2018
1 parent b651532 commit 2a4efba6dbf9bf67c887e55362897d079935bac5
Showing with 30 additions and 0 deletions.
  1. +30 −0 Formula/daemontools.rb
@@ -22,6 +22,36 @@ def install
end
end

def caveats; <<~EOS
You must create /service directory as root before starting svscan.
So, you can start svscan with following commands.
sudo mkdir /service
sudo brew services start daemontools
EOS
end

plist_options :startup => true

def plist; <<~EOS
<?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>#{opt_bin}/svscanboot</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
EOS
end

test do
assert_match /Homebrew/, shell_output("#{bin}/softlimit -t 1 echo 'Homebrew'")
end

0 comments on commit 2a4efba

Please sign in to comment.