|
|
@ -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} |
|
|
|
|
|
|
|