Created
March 24, 2013 11:05
-
-
Save professorjamesmoriarty/5231429 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
set -e | |
#set -u | |
#set -o nounset | |
HELP="Basic Ozcoin API Bash Script | |
Maintainer: Setkeh <setkeh at gmail dot com> | |
Commands: | |
poolhr - Ozcoin Hashrate | |
pooleff - Ozcoin Efficiancy | |
pooldur - Round Duration | |
userhr - User Hashrate | |
userpom - User Payout Method | |
potval - POT Share Value | |
payout - Next Payout Value | |
fee - Payout Method Value | |
NOTE: This scriptis incompleate and tuned to my needs | |
Licence: WTFPL <http://www.wtfpl.net/>" | |
#Ozco API URL | |
URL=.... | |
#Resync with pool API | |
if [ "$1" = "resync" ]; then | |
curl -sS $URL | jshon > ozcoapi | |
echo "Resync Complete" | |
fi | |
#Pool Hash Rate | |
if [ "$1" = "poolhr" ]; then | |
jshon -e pool -e hashrate -u < ozcoapi | |
fi | |
#Pool Efficiancy | |
if [ "$1" = "pooleff" ]; then | |
jshon -e pool -e round_efficiency -u < ozcoapi | |
fi | |
#Pool Round Duaration | |
if [ "$1" = "pooldur" ]; then | |
jshon -e pool -e round_duration -u < ozcoapi | |
fi | |
#User Hash Rate | |
if [ "$1" = "userhr" ]; then | |
jshon -e user -e hashrate -u < ozcoapi | |
fi | |
#User Payout Method | |
if [ "$1" = "userpom" ]; then | |
jshon -e user -e current_payout_method -u < ozcoapi | |
fi | |
#Pot Value | |
if [ "$1" = "potval" ]; then | |
jshon -e pot -e pot_value -u < ozcoapi | |
fi | |
#Next Payout | |
if [ "$1" = "payout" ]; then | |
jshon -e pot -e estimated_payout_pot -u < ozcoapi | |
fi | |
#Fee | |
if [ "$1" = "fee" ]; then | |
jshon -e pot -e pot_fee -u < ozcoapi | |
fi | |
if [ "$1" = "" ]; then | |
echo $HELP | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment