mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-28 12:36:27 +02:00
check hdd before starting screen
This commit is contained in:
@@ -41,6 +41,22 @@ if [ "$EUID" -ne 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
# make sure that its running in screen
|
||||||
# call with '-foreground' to prevent running in screen
|
# call with '-foreground' to prevent running in screen
|
||||||
if [ "$1" != "-foreground" ]; then
|
if [ "$1" != "-foreground" ]; then
|
||||||
@@ -74,21 +90,6 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
# check that path information is valid
|
||||||
if [ -d "$pathTemplateHDD" ]; then
|
if [ -d "$pathTemplateHDD" ]; then
|
||||||
echo "OK found $pathTemplateHDD"
|
echo "OK found $pathTemplateHDD"
|
||||||
|
Reference in New Issue
Block a user