Last active
December 30, 2017 20:03
-
-
Save motivic/384584df15f1da86fe186553aa8b65a7 to your computer and use it in GitHub Desktop.
ethminer start/stop shell script for crontab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Inspired by https://forum.ethereum.org/discussion/13723/cron-the-miner | |
| ethminer=/opt/ethminer | |
| wallet=08adb68e47e6552f23a5d34feb0d7b47852522b6 | |
| log="$HOME/log/ethminer_$(date "+%Y%m%d_%H%M%S").log" | |
| case $1 in | |
| start) | |
| $ethminer --farm-recheck 200 --cuda --stratum us1.ethermine.org:4444 -SF us1.ethermine.org:14444 --userpass $wallet > $log 2>&1 & | |
| ;; | |
| stop) | |
| ethminer_pid=$(ps axf | grep ethminer | grep -v grep | awk '{print $1}') | |
| kill -9 $ethminer_pid | |
| ;; | |
| *) | |
| echo "wrong parameter" | |
| exit 2 | |
| ;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment