This commit is contained in:
Your Name
2024-02-16 17:34:24 -06:00
parent 274fb8ca0d
commit f5f8d0ead2
2 changed files with 5 additions and 6 deletions

View File

@@ -3,11 +3,10 @@ cd /data/openpilot/shell
while true
do
nodejs watcher.js
nodejs watcher.js
# Get free space on /data in GB
free_space=$(df -BG /data | tail -n 1 | awk '{print $4}' | sed 's/G//')
# 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
@@ -18,4 +17,4 @@ free_space=$(df -BG /data | tail -n 1 | awk '{print $4}' | sed 's/G//')
echo crashed, waiting 30 seconds
sleep 30
done
done