diff --git a/home.admin/50torrentHDD.sh b/home.admin/50torrentHDD.sh index e62c671..1c68c44 100755 --- a/home.admin/50torrentHDD.sh +++ b/home.admin/50torrentHDD.sh @@ -42,20 +42,7 @@ sudo mkdir ${targetDir} 2>/dev/null sudo mkdir ${sessionDir}/blockchain/ 2>/dev/null sudo mkdir ${sessionDir}/update/ 2>/dev/null -################################ -# BACKUP TORRENT HOSTING -################################ - -if [ "$1" == "backup-torrent-hosting" ]; then - echo "Starting BACKUP TORRENT HOSTING ..." - sudo rtorrent -n -d ${targetDir} -s ${sessionDir}/blockchain/ /home/admin/assets/${baseTorrentFile}.torrent & - torrentBasePID=$! - sudo rtorrent -n -d ${targetDir} -s ${sessionDir}/update/ /home/admin/assets/${updateTorrentFile}.torrent & - torrentUpdatePID=$! - echo "DONE with torrentBasePID(${torrentBasePID}) & torrentUpdatePID(${torrentUpdatePID})" - exit -fi - +# BACKUP TORRENT SEEDING if [ "$1" == "backup-torrent-hosting-cleanup" ]; then echo "Deleting all possible old (version) torrent data ..." sudo rm -r /home/admin/.rtorrent.session 2>/dev/null @@ -64,7 +51,7 @@ if [ "$1" == "backup-torrent-hosting-cleanup" ]; then fi # if setup was done - remove old data -if [ "${setupStep}" = "100" ]; then +if [ "${setupStep}" = "100" ] && [ ${#1} -eq 0 ]; then echo "stopping servcies ..." sudo systemctl stop lnd sudo systemctl stop ${network}d @@ -119,6 +106,13 @@ if [ ${torrentComplete2} -eq 0 ]; then fi sleep 2 +# BACKUP TORRENT SEEDING +# just let torrent start and run in the background +if [ "$1" == "backup-torrent-hosting" ]; then + echo "Done BACKUP TORRENT HOSTING .." + exit +fi + ############################## # MONITOR PROGRESS ############################## diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index be8a51b..c506dc3 100644 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -436,12 +436,14 @@ sed -i "s/^message=.*/message='Testing Hardware 60s'/g" ${infoFile} sudo /home/admin/config.scripts/blitz.stresstest.sh /home/admin/stresstest.report ################################ -# BACKUP TORRENT HOSTING +# BACKUP TORRENT SEEDING ################################ -if [ "${backupTorrentHosting}" == "on" ]; then +if [ "${backupTorrentSeeding}" == "on" ]; then echo "Starting BACKUP TORRENT HOSTING in background ..." >> $logFile sudo /home/admin/50torrentHDD.sh backup-torrent-hosting + sleep 5 + fi echo "DONE BOOTSTRAP" >> $logFile