Browse Source

torrent download folder

#146
rootzoll 6 years ago
parent
commit
e4aca44f4f
  1. 8
      background_downloadBlockchain.md
  2. 31
      home.admin/50torrentHDD.bitcoin.sh

8
background_downloadBlockchain.md

@ -102,18 +102,20 @@ scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/testnet3/blocks ./testnet3/blocks
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/testnet3/chainstate ./testnet3/chainstate scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/testnet3/chainstate ./testnet3/chainstate
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/testnet3/indexes ./testnet3/indexes scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/testnet3/indexes ./testnet3/indexes
Now create a new torrent-file with your "torrent base directory" as source directory on the packaging computer with a torrent client of your choice (e.g. qTorrent for OSX). (Re-)name the "torrent base directory" to the same name as the torrent UPDATE file itself later (without the .torrent ending). For the correct naming see the chapter "Torrent Files Naming Schema" below.
Now open your torrent client (e.g. qTorrent for OSX) and create a new torrent-file with the freshly renamed "torrent base directory" as source directory.
Add this list of trackers to your torrent and start seeding: Add this list of trackers to your torrent and start seeding:
udp://tracker.coppersurfer.tk:6969/announce udp://tracker.coppersurfer.tk:6969/announce
udp://open.demonii.si:1337/announce udp://open.demonii.si:1337/announce
udp://denis.stalker.upeer.me:6969/announce udp://denis.stalker.upeer.me:6969/announce
Name the update torrent file like the naming shema mentioned below. Name the new torrent file
To create the torrent file can take some time. Finally add the generated torrent file to the /home.admin/assets/ of the github and change the name of the updateTorrent varibale file in the script 50torrentHDD.bitcoin.sh To create the torrent file can take some time. Finally add the generated torrent file to the /home.admin/assets/ of the github and change the name of the updateTorrent varibale file in the script 50torrentHDD.bitcoin.sh
#### Torrent Files Namingschema #### Torrent Files Naming Schema
The base torrent file should always have the following naming scheme: The base torrent file should always have the following naming scheme:
raspiblitz-[CHAINNETWORK][BASEITERATIONNUMBER]-[YEAR]-[MONTH]-[DAY]-base.torrent raspiblitz-[CHAINNETWORK][BASEITERATIONNUMBER]-[YEAR]-[MONTH]-[DAY]-base.torrent

31
home.admin/50torrentHDD.bitcoin.sh

@ -6,8 +6,9 @@ echo ""
# torrent files that are available # torrent files that are available
# in directory /home.admin/assets/ # in directory /home.admin/assets/
baseTorrentFile="raspiblitz-bitcoin1-2018-10-12-base.torrent" # WITHOUT THE '.torrent' ENDING
updateTorrentFile="raspiblitz-bitcoin1-2018-10-12-update.torrent" baseTorrentFile="raspiblitz-bitcoin1-2018-10-12-base"
updateTorrentFile="raspiblitz-bitcoin1-2018-10-12-update"
# make sure rtorrent is available # make sure rtorrent is available
sudo apt-get install rtorrent -y sudo apt-get install rtorrent -y
@ -33,7 +34,7 @@ if [ ${torrentComplete1} -eq 0 ]; then
# start torrent download in screen session # start torrent download in screen session
echo "starting torrent: blockchain" echo "starting torrent: blockchain"
command1="sudo rtorrent -n -d ${targetDir} -s ${sessionDir}/blockchain/ /home/admin/assets/${baseTorrentFile}" command1="sudo rtorrent -n -d ${targetDir} -s ${sessionDir}/blockchain/ /home/admin/assets/${baseTorrentFile}.torrent"
sudo mkdir ${targetDir} 2>/dev/null sudo mkdir ${targetDir} 2>/dev/null
sudo mkdir ${sessionDir}/blockchain/ 2>/dev/null sudo mkdir ${sessionDir}/blockchain/ 2>/dev/null
screenCommand="screen -S blockchain -L screen.log -dm ${command1}" screenCommand="screen -S blockchain -L screen.log -dm ${command1}"
@ -59,7 +60,7 @@ if [ ${torrentComplete2} -eq 0 ]; then
# start torrent download in screen session # start torrent download in screen session
echo "starting torrent: update" echo "starting torrent: update"
command2="sudo rtorrent -n -d ${targetDir} -s ${sessionDir}/update/ /home/admin/assets/${updateTorrentFile}" command2="sudo rtorrent -n -d ${targetDir} -s ${sessionDir}/update/ /home/admin/assets/${updateTorrentFile}.torrent"
sudo mkdir ${targetDir} 2>/dev/null sudo mkdir ${targetDir} 2>/dev/null
sudo mkdir ${sessionDir}/update/ 2>/dev/null sudo mkdir ${sessionDir}/update/ 2>/dev/null
screenCommand="screen -S update -L screen.log -dm ${command2}" screenCommand="screen -S update -L screen.log -dm ${command2}"
@ -212,19 +213,19 @@ if [ ${torrentComplete} -eq 0 ]; then
fi fi
# the path torrent will download to # the path torrent will download to
#targetPath1="${targetDir}/blockchain" targetPath1="${targetDir}/${baseTorrentFile}"
#targetPath2="${targetDir}/update/blockchain" targetPath2="${targetDir}/${updateTorrentFile}"
# Download worked / just move, copy on USB2 >4h # Download worked / just move, copy on USB2 >4h
#echo "*** Moving Files ***" echo "*** Moving Files ***"
#echo "can take some minutes ..." echo "can take some minutes ..."
#date +%s date +%s
#sudo mkdir /mnt/hdd/bitcoin sudo mkdir /mnt/hdd/bitcoin 2>/dev/null
#sudo mv ${targetPath1}/* /mnt/hdd/bitcoin/ sudo mv ${targetPath1}/* /mnt/hdd/bitcoin/
#sudo cp -r ${targetPath2}/* /mnt/hdd/bitcoin/ sudo cp -r ${targetPath2}/* /mnt/hdd/bitcoin/
#sudo rm -r ${targetDir} sudo rm -r ${targetDir}
#echo "OK" echo "OK"
#date +%s date +%s
# continue setup # continue setup
./60finishHDD.sh ./60finishHDD.sh

Loading…
Cancel
Save