monero: add plist (#35854)

This commit is contained in:
Iulian Costan 2019-01-25 16:33:02 +02:00 committed by FX Coudert
parent 92294875fd
commit de01380c4f

View file

@ -40,6 +40,27 @@ class Monero < Formula
rm_rf include/"miniupnpc"
end
plist_options :manual => "monerod"
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}/monerod</string>
<string>--non-interactive</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOS
end
test do
cmd = "yes '' | #{bin}/monero-wallet-cli --restore-deterministic-wallet " \
"--password brew-test --restore-height 1 --generate-new-wallet wallet " \