Browse Source

fixed hdd download finish

#146
rootzoll 7 years ago
parent
commit
deeb3306ee
  1. 3
      home.admin/20initDialog.sh
  2. 5
      home.admin/50downloadHDD.sh
  3. 10
      home.admin/60finishHDD.sh

3
home.admin/20initDialog.sh

@ -73,8 +73,7 @@ while [ ${#result} -lt 8 ]
done done
# set Blockchain RPC Password (for admin cli & template for user bitcoin) # set Blockchain RPC Password (for admin cli & template for user bitcoin)
sed -i "14s/.*/rpcpassword=$result/" ./assets/${network}.conf sed -i "14s/.*/rpcpassword=$result/" /home/admin/assets/${network}.conf
sed -i "6s/.*/rpcpassword=$result/" ./.${network}/${network}.conf
# success info dialog # success info dialog

5
home.admin/50downloadHDD.sh

@ -3,7 +3,7 @@ echo ""
# *** BITCOIN *** # *** BITCOIN ***
bitcoinList="" # url to list with other sources 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 bitcoinSize=100
# *** LITECOIN *** # *** LITECOIN ***
@ -32,6 +32,7 @@ echo "list($list)"
echo "url($url)" echo "url($url)"
echo "size($size)" echo "size($size)"
echo "targetPath($targetPath)" echo "targetPath($targetPath)"
echo ""
echo "*** Downloading HDD / FTP ***" echo "*** Downloading HDD / FTP ***"
sudo wget -r -P /mnt/hdd/ -q --show-progress ${url} sudo wget -r -P /mnt/hdd/ -q --show-progress ${url}
@ -58,7 +59,7 @@ fi
echo "" echo ""
echo "*** Moving Files ***" echo "*** Moving Files ***"
sudo mv /mnt/hdd/${targetPath} /mnt/hdd/litecoin sudo mv /mnt/hdd/${targetPath} /mnt/hdd/${network}
echo "OK" echo "OK"
# continue setup # continue setup

10
home.admin/60finishHDD.sh

@ -15,7 +15,17 @@ if [ ${mountOK} -eq 1 ]; then
###### LINK HDD ###### LINK HDD
echo "" echo ""
echo "*** Prepare ${network} ***" 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 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 ln -s /mnt/hdd/${network} /home/bitcoin/.${network}
sudo mkdir /mnt/hdd/lnd sudo mkdir /mnt/hdd/lnd
sudo chown -R bitcoin:bitcoin /mnt/hdd/lnd sudo chown -R bitcoin:bitcoin /mnt/hdd/lnd

Loading…
Cancel
Save