Title: [TUT] Script - Get an e-mail when a block is found + updown checker (XPM) Post by: arby on July 25, 2013, 08:25:26 AM Ok well, as many others I am mining from different machines, and well, checking all of them for found blocks is very hard, also I am not using the same wallet for all of them so basically I prefer the machines to e-mail me when they find a block.
Also the script checks if primecoind is still running, and if it's not it tries to start it again. 1. Install a mail server (if you don't have one) so that you can receive e-mails On Debian/Ubuntu you should install exim4 in order to get your e-mail working. Code: apt-get update On CentOS/Slackware/Arch/Gentoo I am sure you will find many tutorials of doing this. 2. Save this script in a file and make it executable (chmod +x filename) Code: #!/bin/bash 3. Add this to your cron daemon Code: crontab -e And add the following: For 15 minutes checks: Code: 0,15,30,45 * * * * /path/to/yourscript For hourly checks: Code: 0 */2 * * * /path/to/yourscript Save and close. To check that it was added: Code: crontab -l Regards P.S. This script can be easily modified to work with any daemon by fiddling with 'which primecoind' maybe replacing it with 'which bitcoind', not just the primecoin one, because I think they all work the same way. Title: Re: [TUT] Script - Get an e-mail when a block is found + updown checker (XPM) Post by: k0vic on July 28, 2013, 11:49:36 PM Who would one do this in windows? It would save me so much time :)
|