diff --git a/shell/init_shell.sh b/shell/init_shell.sh index 71703f1..1c29f30 100644 --- a/shell/init_shell.sh +++ b/shell/init_shell.sh @@ -10,4 +10,4 @@ cd /data/openpilot/logs rm -f watcher.log.gz ls watcher.log && gzip watcher.log -screen -dmS "watcher" "bash /data/openpilot/shell/watcher_run_loop.sh" \ No newline at end of file +screen -dmS "watcher" /data/openpilot/shell/watcher_run_loop.sh diff --git a/shell/watcher_run_loop.sh b/shell/watcher_run_loop.sh index 2a82fc6..0c4054e 100644 --- a/shell/watcher_run_loop.sh +++ b/shell/watcher_run_loop.sh @@ -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 \ No newline at end of file +done