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 | |
#setup script | |
yum update | |
yum install nano | |
homedir=~/ | |
fbtcinfo=btcinfo.sh | |
echo -e "./bitcoin-cli -datadir=$homedir.bitcoin getinfo | |
echo -n \"device ip: \" |
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
#get onion address | |
cat /var/lib/tor/bitcoin-service/hostname > $HOME/onionaddr | |
onion=$(<$HOME/onionaddr) | |
echo $onion |
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
[tor] | |
name=Tor repo | |
enabled=1 | |
baseurl=https://deb.torproject.org/torproject.org/rpm/el/6/$basearch/ | |
gpgcheck=1 | |
gpgkey=https://deb.torproject.org/torproject.org/rpm/RPM-GPG-KEY-torproject.org.asc | |
repo_gpgcheck=1 |
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 | |
#get current block height from blockchain.infoecho $(date) | |
wget -4 https://blockchain.info/q/getblockcount &> /dev/null | |
netblk=$(<getblockcount) | |
echo "Current Block: $netblk" | |
#get current block from local bitcoin-cli | |
./bitcoin-cli getblockcount > locblock | |
nodeblk=$(<locblock) | |
echo "Local Block: $nodeblk" | |
#if bitcoin-cli responds, compare local with network blocks |
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 | |
/root/./bitcoin-cli -datadir=/root/.bitcoin stop | |
echo Do not shut down the device until notified | |
x=$(pgrep -f bitcoind) | |
while [ "$x" != "" ] | |
do | |
echo -n "." | |
sleep 1s | |
x=$(pgrep -f bitcoind) | |
done |
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
./bitcoin-cli -datadir=/root/.bitcoin getinfo | |
echo -n "device ip: " | |
ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p' | |
date |