mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-22 16:10:55 +02:00
fixed detect HDD size
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
## get basic info
|
||||||
|
source /home/admin/raspiblitz.info 2>/dev/null
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "*** Checking if HDD is connected ***"
|
echo "*** Checking if HDD is connected ***"
|
||||||
sleep 5
|
sleep 5
|
||||||
@@ -40,7 +43,6 @@ if [ ${existsHDD} -eq 1 ]; then
|
|||||||
minSize=31000000000
|
minSize=31000000000
|
||||||
fi
|
fi
|
||||||
isSize=$(lsblk -o NAME,SIZE -b | grep "${device}" | awk '$1=$1' | cut -d " " -f 2)
|
isSize=$(lsblk -o NAME,SIZE -b | grep "${device}" | awk '$1=$1' | cut -d " " -f 2)
|
||||||
echo "isSize(${num1Kblocks})"
|
|
||||||
if [ ${isSize} -lt ${minSize} ]; then
|
if [ ${isSize} -lt ${minSize} ]; then
|
||||||
if [ ${isSize} -gt 1 ]; then
|
if [ ${isSize} -gt 1 ]; then
|
||||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
## get basic info
|
## get basic info
|
||||||
source /home/admin/raspiblitz.info 2>/dev/null
|
source /home/admin/raspiblitz.info
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "*** Check 1st HDD ***"
|
echo "*** Check 1st HDD ***"
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
## get basic info
|
## get basic info
|
||||||
source /home/admin/raspiblitz.info 2>/dev/null
|
source /home/admin/raspiblitz.info
|
||||||
|
|
||||||
# get local ip
|
# get local ip
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
## get basic info
|
||||||
|
source /home/admin/raspiblitz.info
|
||||||
|
|
||||||
# *** BITCOIN (just mainnet) ***
|
# *** BITCOIN (just mainnet) ***
|
||||||
bitcoinList="" # url to list with other sources
|
bitcoinList="" # url to list with other sources
|
||||||
#bitcoinUrl="ftp://anonymous:anonymous@91.83.237.185:21/raspiblitz-bitcoin-2018-07-16"
|
#bitcoinUrl="ftp://anonymous:anonymous@91.83.237.185:21/raspiblitz-bitcoin-2018-07-16"
|
||||||
@@ -15,9 +18,6 @@ litecoinSize=22220000 # 22221160-tolerance
|
|||||||
# NOTE TO GET THE SIZE RIGHT: for new download add 9999999999 as size. Run download.
|
# NOTE TO GET THE SIZE RIGHT: for new download add 9999999999 as size. Run download.
|
||||||
# When finished the warning comes up and behind WARNING: copy that number
|
# When finished the warning comes up and behind WARNING: copy that number
|
||||||
|
|
||||||
## get basic info
|
|
||||||
source /home/admin/raspiblitz.info 2>/dev/null
|
|
||||||
|
|
||||||
# settings based on network
|
# settings based on network
|
||||||
list=$bitcoinList
|
list=$bitcoinList
|
||||||
url=$bitcoinUrl
|
url=$bitcoinUrl
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
## get basic info
|
## get basic info
|
||||||
source /home/admin/raspiblitz.info 2>/dev/null
|
source /home/admin/raspiblitz.info
|
||||||
|
|
||||||
# only show warning when bitcoin
|
# only show warning when bitcoin
|
||||||
if [ "$network" = "bitcoin" ]; then
|
if [ "$network" = "bitcoin" ]; then
|
||||||
|
@@ -5,7 +5,7 @@ echo ""
|
|||||||
# why there are two torrent files
|
# why there are two torrent files
|
||||||
|
|
||||||
## get basic info
|
## get basic info
|
||||||
source /home/admin/raspiblitz.info 2>/dev/null
|
source /home/admin/raspiblitz.info
|
||||||
|
|
||||||
# make sure rtorrent is available
|
# make sure rtorrent is available
|
||||||
sudo apt-get install rtorrent -y
|
sudo apt-get install rtorrent -y
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
## get basic info
|
## get basic info
|
||||||
source /home/admin/raspiblitz.info 2>/dev/null
|
source /home/admin/raspiblitz.info
|
||||||
|
|
||||||
echo "*** Checking HDD ***"
|
echo "*** Checking HDD ***"
|
||||||
mountOK=$(df | grep -c /mnt/hdd)
|
mountOK=$(df | grep -c /mnt/hdd)
|
||||||
|
Reference in New Issue
Block a user