This commit is contained in:
Your Name
2024-02-15 23:42:27 -06:00
parent 8c60f0956b
commit c93bda5316
3 changed files with 57 additions and 7 deletions

View File

@@ -3,9 +3,19 @@ cd /data/openpilot/shell
while true
do
nodejs watcher.js
nodejs watcher.js
echo crashed, waiting 30 seconds
sleep 30
# Get free space on /data in GB
free_space=$(df -BG /data | tail -n 1 | awk '{print $4}' | sed 's/G//')
# Check if free space is less than 10GB
if [ "$free_space" -lt 10 ]; then
echo "Less than 10GB of free space on /data. Exiting."
exit 1
fi
echo crashed, waiting 30 seconds
sleep 30
done