mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-19 01:40:16 +01:00
test uuid of backupdevice (#3976)
This commit is contained in:
parent
9039a0f1b2
commit
d9e7b66143
@ -27,7 +27,14 @@ if [ "$1" = "status" ]; then
|
||||
# check if backup device is mounted
|
||||
backupDeviceExists=$(df | grep -c "/mnt/backup")
|
||||
if [ ${backupDeviceExists} -gt 0 ]; then
|
||||
echo "isMounted=1"
|
||||
backupDeviceName=$(lsblk -o NAME,UUID | grep "${localBackupDeviceUUID}" | cut -d " " -f 1)
|
||||
backupDeviceName=${backupDeviceName:2:4}
|
||||
backupDeviceIsBackupDevice=$(df | grep -c ${backupDeviceName})
|
||||
if [ ${backupDeviceIsBackupDevice} -gt 0 ]; then
|
||||
echo "isMounted=1"
|
||||
else
|
||||
echo "isMounted=0"
|
||||
fi
|
||||
else
|
||||
echo "isMounted=0"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user