From e0f155d26bf4ebb9b06c09698bf778de6fe94cfe Mon Sep 17 00:00:00 2001 From: Shannon Appelcline Date: Tue, 28 Feb 2017 16:00:13 -0800 Subject: [PATCH] A variety of small updates from last week. --- Linode_Bitcoin-Core_VPS_Setup.stackscript | 37 +++++------------------ 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/Linode_Bitcoin-Core_VPS_Setup.stackscript b/Linode_Bitcoin-Core_VPS_Setup.stackscript index 81414ff..fb7dec8 100644 --- a/Linode_Bitcoin-Core_VPS_Setup.stackscript +++ b/Linode_Bitcoin-Core_VPS_Setup.stackscript @@ -33,6 +33,7 @@ IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://') exec > >(tee -a /root/stackscript.log) 2> >(tee -a /root/stackscript.log /root/stackscript.err >&2) echo "$0 - BEGINNING NEW MACHINE SETUP STACKSCRIPT" +echo "$0 - BITCOIN SETUP TYPE IS: $BTCTYPE" #### # 1. Update Hostname @@ -176,7 +177,7 @@ fi # Give user some helpful bitcoin aliases -if [ "$BTCTYPE" == "Testnet" ]; then +if [ "$BTCTYPE" == "Testnet" ] || [ "$BTCTYPE" == "Pruned Testnet" ]; then sudo -u user1 cat >> ~user1/.bash_profile <> ~user1/.bitcoin/bitcoin.conf << EOF server=1 dbcache=1536 par=1 -txindex=1 blocksonly=1 maxuploadtarget=137 maxconnections=16 @@ -304,48 +301,30 @@ rpcuser=bitcoinrpc rpcpassword=$(xxd -l 16 -p /dev/urandom) EOF +if [ "$BTCTYPE" == "Mainnet" ]; then + +cat >> ~user1/.bitcoin/bitcoin.conf << EOF +txindex=1 +EOF + elif [ "$BTCTYPE" == "Pruned Mainnet" ]; then cat >> ~user1/.bitcoin/bitcoin.conf << EOF -server=1 -dbcache=1536 -par=1 -blocksonly=1 prune=550 -maxuploadtarget=137 -maxconnections=16 -rpcuser=bitcoinrpc -rpcpassword=$(xxd -l 16 -p /dev/urandom) EOF elif [ "$BTCTYPE" == "Testnet" ]; then cat >> ~user1/.bitcoin/bitcoin.conf << EOF -server=1 -dbcache=1536 -par=1 txindex=1 -blocksonly=1 -maxuploadtarget=137 -maxconnections=16 testnet=1 -rpcuser=bitcoinrpc -rpcpassword=$(xxd -l 16 -p /dev/urandom) EOF elif [ "$BTCTYPE" == "Pruned Testnet" ]; then cat >> ~user1/.bitcoin/bitcoin.conf << EOF -server=1 -dbcache=1536 -par=1 -blocksonly=1 prune=550 -maxuploadtarget=137 -maxconnections=16 testnet=1 -rpcuser=bitcoinrpc -rpcpassword=$(xxd -l 16 -p /dev/urandom) EOF elif [ "$BTCTYPE" == "Private Regtest" ]; then