Skip to content

Instantly share code, notes, and snippets.

@supercoffee
Created December 23, 2017 00:31
Show Gist options
  • Save supercoffee/40ef81c8a5be72c647c299eeb9aac97f to your computer and use it in GitHub Desktop.
Save supercoffee/40ef81c8a5be72c647c299eeb9aac97f to your computer and use it in GitHub Desktop.
LaunchDaemons to mine ethereum
<?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>com.github.ethminer</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>ThrottleInterval</key>
<integer>300</integer>
<key>ProgramArguments</key>
<array>
<string>/Users/ben/.scripts/ethminer</string>
<string>-G</string>
<string>-U</string>
<string>-S</string>
<string>us1.ethermine.org:4444</string>
<string>-O</string>
<!-- substitute the following string for your own ethereum wallet address -->
<string>94aeb83f43d0123319c46a11fc708497aa14d87b.hackncheese</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/ben</string>
<key>StandardOutPath</key>
<string>/tmp/ethminer.log</string>
<key>StandardErrorPath</key>
<string>/tmp/ethminer-error.log</string>
<key>UserName</key>
<string>ben</string>
<key>GroupName</key>
<string>staff</string>
</dict>
</plist>
<?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>homebrew.mxcl.ethereum</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>ThrottleInterval</key>
<integer>300</integer>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/geth</string>
<string>--rpc</string>
<string>--rpccorsdomain=localhost</string>
</array>
<key>WorkingDirectory</key>
<string>/Users/ben</string>
<key>StandardOutPath</key>
<string>/tmp/geth.log</string>
<key>StandardErrorPath</key>
<string>/tmp/geth-error.log</string>
<key>UserName</key>
<string>ben</string>
<key>GroupName</key>
<string>staff</string>
</dict>
</plist>
@supercoffee
Copy link
Author

Copy the following files into /Library/LaunchDaemons to launch geth and ethminer on system start. The daemons will run under your local user account. Adjust the paths and usernames to match your setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment