diff --git a/background_downloadBlockchain.md b/background_downloadBlockchain.md index 1babed4..0549f1d 100644 --- a/background_downloadBlockchain.md +++ b/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/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: udp://tracker.coppersurfer.tk:6969/announce udp://open.demonii.si:1337/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 -#### Torrent Files Namingschema +#### Torrent Files Naming Schema The base torrent file should always have the following naming scheme: raspiblitz-[CHAINNETWORK][BASEITERATIONNUMBER]-[YEAR]-[MONTH]-[DAY]-base.torrent diff --git a/home.admin/50torrentHDD.bitcoin.sh b/home.admin/50torrentHDD.bitcoin.sh index df4915d..036ad09 100755 --- a/home.admin/50torrentHDD.bitcoin.sh +++ b/home.admin/50torrentHDD.bitcoin.sh @@ -6,8 +6,9 @@ echo "" # torrent files that are available # in directory /home.admin/assets/ -baseTorrentFile="raspiblitz-bitcoin1-2018-10-12-base.torrent" -updateTorrentFile="raspiblitz-bitcoin1-2018-10-12-update.torrent" +# WITHOUT THE '.torrent' ENDING +baseTorrentFile="raspiblitz-bitcoin1-2018-10-12-base" +updateTorrentFile="raspiblitz-bitcoin1-2018-10-12-update" # make sure rtorrent is available sudo apt-get install rtorrent -y @@ -33,7 +34,7 @@ if [ ${torrentComplete1} -eq 0 ]; then # start torrent download in screen session 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 ${sessionDir}/blockchain/ 2>/dev/null screenCommand="screen -S blockchain -L screen.log -dm ${command1}" @@ -59,7 +60,7 @@ if [ ${torrentComplete2} -eq 0 ]; then # start torrent download in screen session 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 ${sessionDir}/update/ 2>/dev/null screenCommand="screen -S update -L screen.log -dm ${command2}" @@ -212,19 +213,19 @@ if [ ${torrentComplete} -eq 0 ]; then fi # the path torrent will download to -#targetPath1="${targetDir}/blockchain" -#targetPath2="${targetDir}/update/blockchain" +targetPath1="${targetDir}/${baseTorrentFile}" +targetPath2="${targetDir}/${updateTorrentFile}" # Download worked / just move, copy on USB2 >4h -#echo "*** Moving Files ***" -#echo "can take some minutes ..." -#date +%s -#sudo mkdir /mnt/hdd/bitcoin -#sudo mv ${targetPath1}/* /mnt/hdd/bitcoin/ -#sudo cp -r ${targetPath2}/* /mnt/hdd/bitcoin/ -#sudo rm -r ${targetDir} -#echo "OK" -#date +%s +echo "*** Moving Files ***" +echo "can take some minutes ..." +date +%s +sudo mkdir /mnt/hdd/bitcoin 2>/dev/null +sudo mv ${targetPath1}/* /mnt/hdd/bitcoin/ +sudo cp -r ${targetPath2}/* /mnt/hdd/bitcoin/ +sudo rm -r ${targetDir} +echo "OK" +date +%s # continue setup ./60finishHDD.sh