forked from joshpetrick/mnTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path50-mn-count
21 lines (16 loc) · 942 Bytes
/
50-mn-count
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
BALANCE=$(/usr/local/bin/chaincoind getinfo | grep -m 1 balance)
IPADDR=$(ifconfig eth0 | grep -oP 'inet addr:\K\S+')
STATUS=$(/usr/local/bin/chaincoind masternodelist status $IPADDR|grep -m 1 "$IPADDR")
CATEGORY=$(/usr/local/bin/chaincoind listtransactions | grep "category" | tail -1)
AMOUNT=$(/usr/local/bin/chaincoind listtransactions | grep "amount" | tail -1)
TIMERECIEVED=$(/usr/local/bin/chaincoind listtransactions | grep "timereceived" | tail -1)
MNADDRESS="CTCJM7BHzrSYuR4QYYYcsDLxfe2mNxE2pg"
printf "\n\t$(tput setf 2)Masternode$BALANCE$(tput sgr0)"
printf "\n$(tput setf 2)******************Last Transaction**********************"
printf "\n\t$CATEGORY"
printf "\n\t$AMOUNT"
printf "\n\t$TIMERECIEVED"
printf "\n********************************************************$(tput sgr0)\n"
printf "\n$(tput setf 3)Status:\t$STATUS$(tput sgr0)\n"
printf "\n\n$(tput setf 5)Donations Are Cool:$(tput sgr0) $MNADDRESS\n\n"