Skip to content

Commit

Permalink
daemontools: add plist.
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu authored and MikeMcQuaid committed Dec 17, 2018
1 parent b651532 commit 2a4efba
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Formula/daemontools.rb
Expand Up @@ -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
Expand Down

0 comments on commit 2a4efba

Please sign in to comment.