mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-10 21:00:36 +02:00
backup torrent seeding
This commit is contained in:
parent
e5d3025e5d
commit
19d0843c18
@ -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
|
||||
##############################
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user