Browse Source

fix issue #217 inluceding migration

dev
rootzoll 6 years ago
parent
commit
71aef112f7
  1. 30
      home.admin/_bootstrap.migration.sh
  2. 3
      home.admin/assets/bitcoin.conf

30
home.admin/_bootstrap.migration.sh

@ -78,6 +78,36 @@ echo "default values OK" >> ${logFile}
# this is the place if on a future version change
# a conversion of config data or app data is needed
# if old bitcoin.conf exists ...
configExists=$(sudo ls /mnt/hdd/bitcoin/bitcoin.conf | grep -c '.conf')
if [ ${configExists} -eq 1 ]; then
echo "Checking old bitcoin.conf ..." >> ${logFile}
# make sure to fix bitcoind RPC port if not done in old version
# https://github.com/rootzoll/raspiblitz/issues/217
settingExists=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep -c 'rpcport=')
if [ ${settingExists} -eq 0 ]; then
echo "fix issue #217 -> adding rpcport=8332" >> ${logFile}
echo "rpcport=8332" >> /mnt/hdd/bitcoin/bitcoin.conf
else
echo "check issue #217 -> ok rpcport exists" >> ${logFile}
fi
settingExists=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep -c 'rpcallowip=')
if [ ${settingExists} -eq 0 ]; then
echo "fix issue #217 -> adding rpcallowip=127.0.0.1" >> ${logFile}
echo "rpcallowip=127.0.0.1" >> /mnt/hdd/bitcoin/bitcoin.conf
else
echo "check issue #217 -> ok rpcallowip exists" >> ${logFile}
fi
settingExists=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep -c 'rpcbind=')
if [ ${settingExists} -eq 0 ]; then
echo "fix issue #217 -> adding rpcbind=127.0.0.1:8332" >> ${logFile}
echo "rpcbind=127.0.0.1:8332" >> /mnt/hdd/bitcoin/bitcoin.conf
else
echo "check issue #217 -> ok rpcbind exists" >> ${logFile}
fi
fi
echo "Version Code: ${codeVersion}" >> ${logFile}
echo "Version Data: ${raspiBlitzVersion}" >> ${logFile}

3
home.admin/assets/bitcoin.conf

@ -12,6 +12,9 @@ disablewallet=1
# Connection settings
rpcuser=raspibolt
rpcpassword=passwordB
rpcport=8332
rpcallowip=127.0.0.1
rpcbind=127.0.0.1:8332
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333

Loading…
Cancel
Save