Improve quicksync speed management

This commit is contained in:
Taylor Helsper 2019-08-19 23:39:10 -05:00
parent 523bd9b7ce
commit 59bebe31bd
2 changed files with 10 additions and 5 deletions

View File

@ -32,6 +32,7 @@ done
echo "QuickSync Complete! Enabling Uploading."
while true; do
PERCENT=$(transmission-remote -t 1 -i | grep "Percent Done:")
if [ -f $UPLOADER_FILE ]; then
echo "Marked as uploader, unlimited upload"
transmission-remote -U
@ -41,6 +42,9 @@ while true; do
elif [ ! -f "/mnt/hdd/mynode/.mynode_bitcoind_synced" ]; then
echo "Bitcoin not synced, stopping upload"
transmission-remote -u 0
elif [[ "$PERCENT" != *"100"* ]]; then
echo "QuickSync is downloading, stopping upload"
transmission-remote -u 0
elif [ -f $QUICKSYNC_BANDWIDTH_FILE ]; then
RATE=$(cat $QUICKSYNC_BANDWIDTH_FILE)
echo "Setting upload rate to $RATE kbps"

View File

@ -84,16 +84,17 @@ else
if [ $COMPLETED -eq 1 ]; then
touch $QUICKSYNC_DIR/.quicksync_download_complete
touch $QUICKSYNC_DIR/.quicksync_complete
# Since this will start/continue a background download, wait so everything else boots smoothly
sleep 5m
/usr/bin/wait_on_bitcoin.sh
sleep 10m
fi
sync
fi
fi
# If Quicksync has already completed, let's give BTC some time to start
if [ -f $QUICKSYNC_DIR/.quicksync_complete ]; then
/usr/bin/wait_on_bitcoin.sh
sleep 5m
fi
# Start torrent
echo "Running torrent..."
transmission-cli \