Improve quicksync speed management
This commit is contained in:
parent
523bd9b7ce
commit
59bebe31bd
|
@ -32,6 +32,7 @@ done
|
||||||
echo "QuickSync Complete! Enabling Uploading."
|
echo "QuickSync Complete! Enabling Uploading."
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
PERCENT=$(transmission-remote -t 1 -i | grep "Percent Done:")
|
||||||
if [ -f $UPLOADER_FILE ]; then
|
if [ -f $UPLOADER_FILE ]; then
|
||||||
echo "Marked as uploader, unlimited upload"
|
echo "Marked as uploader, unlimited upload"
|
||||||
transmission-remote -U
|
transmission-remote -U
|
||||||
|
@ -41,6 +42,9 @@ while true; do
|
||||||
elif [ ! -f "/mnt/hdd/mynode/.mynode_bitcoind_synced" ]; then
|
elif [ ! -f "/mnt/hdd/mynode/.mynode_bitcoind_synced" ]; then
|
||||||
echo "Bitcoin not synced, stopping upload"
|
echo "Bitcoin not synced, stopping upload"
|
||||||
transmission-remote -u 0
|
transmission-remote -u 0
|
||||||
|
elif [[ "$PERCENT" != *"100"* ]]; then
|
||||||
|
echo "QuickSync is downloading, stopping upload"
|
||||||
|
transmission-remote -u 0
|
||||||
elif [ -f $QUICKSYNC_BANDWIDTH_FILE ]; then
|
elif [ -f $QUICKSYNC_BANDWIDTH_FILE ]; then
|
||||||
RATE=$(cat $QUICKSYNC_BANDWIDTH_FILE)
|
RATE=$(cat $QUICKSYNC_BANDWIDTH_FILE)
|
||||||
echo "Setting upload rate to $RATE kbps"
|
echo "Setting upload rate to $RATE kbps"
|
||||||
|
|
|
@ -84,16 +84,17 @@ else
|
||||||
if [ $COMPLETED -eq 1 ]; then
|
if [ $COMPLETED -eq 1 ]; then
|
||||||
touch $QUICKSYNC_DIR/.quicksync_download_complete
|
touch $QUICKSYNC_DIR/.quicksync_download_complete
|
||||||
touch $QUICKSYNC_DIR/.quicksync_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
|
fi
|
||||||
sync
|
sync
|
||||||
fi
|
fi
|
||||||
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
|
# Start torrent
|
||||||
echo "Running torrent..."
|
echo "Running torrent..."
|
||||||
transmission-cli \
|
transmission-cli \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user