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

@@ -10,4 +10,4 @@ cd /data/openpilot/logs
rm -f watcher.log.gz rm -f watcher.log.gz
ls watcher.log && gzip watcher.log ls watcher.log && gzip watcher.log
screen -dmS "watcher" "bash /data/openpilot/shell/watcher_run_loop.sh" screen -dmS "watcher" /data/openpilot/shell/watcher_run_loop.sh

View File

@@ -3,11 +3,10 @@ cd /data/openpilot/shell
while true while true
do do
nodejs watcher.js nodejs watcher.js
# Get free space on /data in GB
# Get free space on /data in GB free_space=$(df -BG /data | tail -n 1 | awk '{print $4}' | sed 's/G//')
free_space=$(df -BG /data | tail -n 1 | awk '{print $4}' | sed 's/G//')
# Check if free space is less than 10GB # Check if free space is less than 10GB
if [ "$free_space" -lt 10 ]; then if [ "$free_space" -lt 10 ]; then