backup torrent seeding

This commit is contained in:
Christian Rotzoll 2019-04-11 16:30:19 +01:00
parent e5d3025e5d
commit 19d0843c18
2 changed files with 13 additions and 17 deletions

View File

@ -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
##############################

View File

@ -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