diff --git a/home.admin/20initDialog.sh b/home.admin/20initDialog.sh index b2a1a05..e1d9943 100755 --- a/home.admin/20initDialog.sh +++ b/home.admin/20initDialog.sh @@ -73,8 +73,7 @@ while [ ${#result} -lt 8 ] done # set Blockchain RPC Password (for admin cli & template for user bitcoin) -sed -i "14s/.*/rpcpassword=$result/" ./assets/${network}.conf -sed -i "6s/.*/rpcpassword=$result/" ./.${network}/${network}.conf +sed -i "14s/.*/rpcpassword=$result/" /home/admin/assets/${network}.conf # success info dialog diff --git a/home.admin/50downloadHDD.sh b/home.admin/50downloadHDD.sh index 0d08ee0..a468a7f 100755 --- a/home.admin/50downloadHDD.sh +++ b/home.admin/50downloadHDD.sh @@ -3,7 +3,7 @@ echo "" # *** BITCOIN *** bitcoinList="" # url to list with other sources -bitcoinUrl="ftp://anonymous:anonymous@tll9xsfkjht8j26z.myfritz.net/raspiblitz-hdd-2018-07-16" +bitcoinUrl="ftp://anonymous:anonymous@tll9xsfkjht8j26z.myfritz.net/raspiblitz-bitcoin-2018-07-16" bitcoinSize=100 # *** LITECOIN *** @@ -32,6 +32,7 @@ echo "list($list)" echo "url($url)" echo "size($size)" echo "targetPath($targetPath)" +echo "" echo "*** Downloading HDD / FTP ***" sudo wget -r -P /mnt/hdd/ -q --show-progress ${url} @@ -58,7 +59,7 @@ fi echo "" echo "*** Moving Files ***" -sudo mv /mnt/hdd/${targetPath} /mnt/hdd/litecoin +sudo mv /mnt/hdd/${targetPath} /mnt/hdd/${network} echo "OK" # continue setup diff --git a/home.admin/60finishHDD.sh b/home.admin/60finishHDD.sh index 3793ed4..583900f 100755 --- a/home.admin/60finishHDD.sh +++ b/home.admin/60finishHDD.sh @@ -15,7 +15,17 @@ if [ ${mountOK} -eq 1 ]; then ###### LINK HDD echo "" echo "*** Prepare ${network} ***" + sudo killall -u bitcoin + sleep 5 + sudo rm -r /home/bitcoin/.${network} + sleep 2 + if [ -d /home/bitcoin/.${network} ]; then + echo "FAIL - /home/bitcoin/.${network} exists and cannot be removed!" + exit 1 + fi sudo cp /home/admin/assets/${network}.conf /mnt/hdd/${network}/${network}.conf + sudo mkdir /home/admin/.${network} + sudo cp /home/admin/assets/${network}.conf /home/admin/.${network}/${network}.conf sudo ln -s /mnt/hdd/${network} /home/bitcoin/.${network} sudo mkdir /mnt/hdd/lnd sudo chown -R bitcoin:bitcoin /mnt/hdd/lnd