mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-28 15:31:37 +00:00
23 lines
392 B
Bash
Executable File
23 lines
392 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Find
|
|
drive=""
|
|
|
|
drive=$(cat /tmp/.mynode_drive)
|
|
while [ -z "$drive" ]; do
|
|
sleep 10
|
|
echo "Waiting on myNode Drive..."
|
|
drive=$(cat /tmp/.mynode_drive)
|
|
done
|
|
|
|
echo "Found Drive: $drive"
|
|
|
|
lsblk $drive &> /dev/null
|
|
while [ $? -eq 0 ]; do
|
|
echo "$drive still found..."
|
|
sleep 60
|
|
lsblk $drive &> /dev/null
|
|
done
|
|
|
|
echo "Drive $drive NOT found! Rebooting."
|
|
reboot -f |