mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-28 20:42:41 +02:00
auto resume ftp
This commit is contained in:
@@ -139,9 +139,17 @@ if [ ${mountOK} -eq 1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# check if there is a download to continue
|
# check if there is a download to continue
|
||||||
downloadProgressExists=$(sudo ls /home/admin/.Download.out 2>/dev/null | grep ".Download.out" -c)
|
torrentProgressExists=$(sudo ls /mnt/hdd/ 2>/dev/null | grep "torrent" -c)
|
||||||
|
if [ ${torrentProgressExists} -eq 1 ]; then
|
||||||
|
echo "found torrent data .. resuming"
|
||||||
|
./50torrentHDD.sh
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check if there is a download to continue
|
||||||
|
downloadProgressExists=$(sudo ls /mnt/hdd/ 2>/dev/null | grep "download" -c)
|
||||||
if [ ${downloadProgressExists} -eq 1 ]; then
|
if [ ${downloadProgressExists} -eq 1 ]; then
|
||||||
echo "found download in progress .."
|
echo "found download in data .. resuming"
|
||||||
./50downloadHDD.sh
|
./50downloadHDD.sh
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@@ -36,11 +36,21 @@ echo "Running RaspiBlitz Bootstrap ${codeVersion}" >> $logFile
|
|||||||
date >> $logFile
|
date >> $logFile
|
||||||
echo "***********************************************" >> $logFile
|
echo "***********************************************" >> $logFile
|
||||||
|
|
||||||
|
# set default values for raspiblitz.info
|
||||||
|
network=""
|
||||||
|
chain=""
|
||||||
|
setupStep=0
|
||||||
|
|
||||||
|
# try to load old values if available (overwrites defaults)
|
||||||
|
source infoFile 2>/dev/null
|
||||||
|
|
||||||
|
# resetting info file
|
||||||
echo "Resetting the InfoFile: ${infoFile}"
|
echo "Resetting the InfoFile: ${infoFile}"
|
||||||
echo "state=starting" > $infoFile
|
echo "state=starting" > $infoFile
|
||||||
echo "network=" >> $infoFile
|
|
||||||
echo "chain=" >> $infoFile
|
|
||||||
echo "message=" >> $infoFile
|
echo "message=" >> $infoFile
|
||||||
|
echo "network=${network}" >> $infoFile
|
||||||
|
echo "chain=${chain}" >> $infoFile
|
||||||
|
echo "setupStep=${setupStep}" >> $infoFile
|
||||||
sudo chmod 777 ${infoFile}
|
sudo chmod 777 ${infoFile}
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
Reference in New Issue
Block a user