mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 14:08:07 +00:00
Don't reset Bitcoin RPC password if resetting blockchain data
This commit is contained in:
parent
0c9cf7f12f
commit
7b7817bc4d
|
@ -536,6 +536,12 @@ chown bitcoin:bitcoin /mnt/hdd/mynode/settings/.btcrpc_environment
|
|||
if [ -f /mnt/hdd/mynode/bitcoin/bitcoin.conf ]; then
|
||||
sed -i "s/rpcauth=.*/$RPCAUTH/g" /mnt/hdd/mynode/bitcoin/bitcoin.conf
|
||||
fi
|
||||
if [ -f /mnt/hdd/mynode/dojo/docker/my-dojo/conf/docker-bitcoind.conf ]; then
|
||||
sed -i "s/BITCOIND_RPC_PASSWORD=.*/BITCOIND_RPC_PASSWORD=$BTCRPCPW/g" /mnt/hdd/mynode/dojo/docker/my-dojo/conf/docker-bitcoind.conf
|
||||
fi
|
||||
if [ -f /mnt/hdd/mynode/dojo/docker/my-dojo/conf/docker-bitcoind.conf.tpl ]; then
|
||||
sed -i "s/BITCOIND_RPC_PASSWORD=.*/BITCOIND_RPC_PASSWORD=$BTCRPCPW/g" /mnt/hdd/mynode/dojo/docker/my-dojo/conf/docker-bitcoind.conf.tpl
|
||||
fi
|
||||
|
||||
|
||||
# Append bitcoin UID and GID to btcrpc_environment
|
||||
|
|
|
@ -891,8 +891,8 @@ def reset_bitcoin_env_file():
|
|||
def delete_bitcoin_data():
|
||||
os.system("rm -rf /mnt/hdd/mynode/bitcoin")
|
||||
os.system("rm -rf /mnt/hdd/mynode/quicksync/.quicksync_complete")
|
||||
os.system("rm -rf /mnt/hdd/mynode/settings/.btcrpc_environment")
|
||||
os.system("rm -rf /mnt/hdd/mynode/settings/.btcrpcpw")
|
||||
#os.system("rm -rf /mnt/hdd/mynode/settings/.btcrpc_environment")
|
||||
#os.system("rm -rf /mnt/hdd/mynode/settings/.btcrpcpw")
|
||||
|
||||
def reset_blockchain():
|
||||
stop_bitcoin()
|
||||
|
@ -1206,5 +1206,5 @@ def generate_qr_code(url):
|
|||
img = qr.make_image()
|
||||
return img
|
||||
except Exception as e:
|
||||
print("generate_qr_code exception: {}".format(str(e)))
|
||||
log_message("generate_qr_code exception: {}".format(str(e)))
|
||||
return None
|
Loading…
Reference in New Issue
Block a user