Improve torrent redownload check

This commit is contained in:
Taylor Helsper 2019-07-06 22:18:19 -05:00
parent 24ef772d03
commit 10235210f3
3 changed files with 11 additions and 2 deletions

View File

@ -3,10 +3,15 @@
source /usr/share/mynode/mynode_config.sh
echo "Waiting until QuickSync is complete..."
while [ ! -f $QUICKSYNC_DIR/.quicksync_complete ]; do
while [ ! -f "$QUICKSYNC_COMPLETE_FILE" ]; do
sleep 1m
done
echo "Quicksync Complete. Checking if there is a new torrent available..."
echo "Quicksync Complete! Waiting until Bitcoin Sync is complete..."
while [ ! -f "$BITCOIN_SYNCED_FILE" ]; do
sleep 1m
done
echo "Bitcoin Sync Complete! Checking if there is a new torrent available..."
sleep 1d
while true; do
# Wait a while... we don't want everyone starting on a new torrent at once

View File

@ -24,6 +24,9 @@ LND_CHANNEL_FILE_BACKUP="/home/bitcoin/lnd_backup/channel.backup"
LND_ADMIN_MACAROON_FILE="/mnt/hdd/mynode/lnd/data/chain/bitcoin/mainnet/admin.macaroon"
PRODUCT_KEY_FILE="/home/bitcoin/.mynode/.product_key"
BITCOIN_SYNCED_FILE="/mnt/hdd/mynode/.mynode_bitcoind_synced"
QUICKSYNC_COMPLETE_FILE="$QUICKSYNC_DIR/.quicksync_complete"
PRODUCT_KEY="not_found"
if [ -f $PRODUCT_KEY_FILE ]; then
PRODUCT_KEY=$(cat $PRODUCT_KEY_FILE)

View File

@ -17,6 +17,7 @@ IS_ROCK64=0
IS_RASPI3=0
IS_RASPI4=0
uname -a | grep aarch64 && IS_ROCK64=1 || IS_RASPI3=1
# TODO: Determine RASPI4
# Make sure FS is expanded for Rock64
if [ $IS_ROCK64 = 1 ]; then