mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-25 07:07:46 +01:00
reboot on HDD disconnect
This commit is contained in:
parent
5cf3d9e4b5
commit
77780ff61f
1 changed files with 10 additions and 0 deletions
|
@ -381,6 +381,16 @@ if [ ${isMounted} -eq 0 ]; then
|
||||||
sed -i "s/^localip=.*/localip='${localip}'/g" ${infoFile}
|
sed -i "s/^localip=.*/localip='${localip}'/g" ${infoFile}
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
# get fresh info about data drive (just in case user disconnects)
|
||||||
|
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
||||||
|
if [ ${#hddError} -gt 0 ] || [ ${#hddCandidate} -eq 0 ]; then
|
||||||
|
sed -i "s/^state=.*/state=errorHDD/g" ${infoFile}
|
||||||
|
sed -i "s/^message=.*/message='lost HDD - rebooting'/g" ${infoFile}
|
||||||
|
sudo shutdown -r now
|
||||||
|
sleep 100
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue