From fb6a49a959dfa2590e5effcb058ad855ada8e669 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Mon, 21 Oct 2019 18:30:28 -0500 Subject: [PATCH] Handle 'empty' btcrpc pw --- rootfs/standard/usr/bin/mynode_startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rootfs/standard/usr/bin/mynode_startup.sh b/rootfs/standard/usr/bin/mynode_startup.sh index bc6466b9..5893ab16 100755 --- a/rootfs/standard/usr/bin/mynode_startup.sh +++ b/rootfs/standard/usr/bin/mynode_startup.sh @@ -91,7 +91,7 @@ cp -f /home/bitcoin/.mynode/.product_key* /mnt/hdd/mynode/settings/ || true cp -f /mnt/hdd/mynode/settings/.product_key* home/bitcoin/.mynode/ || true # Randomize RPC password -if [ ! -f /mnt/hdd/mynode/settings/.btcrpcpw ]; then +if [ ! -f /mnt/hdd/mynode/settings/.btcrpcpw ] || [ ! -s /mnt/hdd/mynode/settings/.btcrpcpw ]; then # Write random pw to .btcrpcpw < /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-24} > /mnt/hdd/mynode/settings/.btcrpcpw chown bitcoin:bitcoin /mnt/hdd/mynode/settings/.btcrpcpw