I honestly just went the easy way doing that:
while true; do mount | grep "sda1 on / type ext4 (ro" > /dev/null if (($? == 0)); then fsck -y /dev/sda1 reboot fi sleep 60 done
not the best practice for sure, but...
I honestly just went the easy way doing that:
while true; do
mount | grep "sda1 on / type ext4 (ro" > /dev/null
if (($? == 0)); then
fsck -y /dev/sda1
reboot
fi
sleep 60
done
not the best practice for sure, but...