mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-11 21:29:29 +02:00
check hdd before starting screen
This commit is contained in:
parent
48880bc622
commit
877f3758fb
@ -41,6 +41,22 @@ if [ "$EUID" -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# get HDD info
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
|
||||
# check if HDD is mounted
|
||||
if [ ${isMounted} -eq 0 ]; then
|
||||
echo "FAIL - HDD is not mounted"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if HDD is big enough
|
||||
if [ ${hddGigaBytes} -lt 800 ]; then
|
||||
echo "FAIL - HDD is too small to run copy station (+/- 1TB needed)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# make sure that its running in screen
|
||||
# call with '-foreground' to prevent running in screen
|
||||
if [ "$1" != "-foreground" ]; then
|
||||
@ -74,21 +90,6 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# get HDD info
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
|
||||
# check if HDD is mounted
|
||||
if [ ${isMounted} -eq 0 ]; then
|
||||
echo "FAIL - HDD is not mounted"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if HDD is big enough
|
||||
if [ ${hddGigaBytes} -lt 800 ]; then
|
||||
echo "FAIL - HDD is too small to run copy station (+/- 1TB needed)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check that path information is valid
|
||||
if [ -d "$pathTemplateHDD" ]; then
|
||||
echo "OK found $pathTemplateHDD"
|
||||
|
Loading…
x
Reference in New Issue
Block a user