mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-24 13:38:11 +00:00
Improve quicksync speed management
This commit is contained in:
parent
523bd9b7ce
commit
59bebe31bd
|
@ -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"
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in New Issue
Block a user