You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
366 B

  1. #!/bin/bash
  2. # This loops the chunker script while the RUN file exists.
  3. # See chunker for details.
  4. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  5. while [[ -f RUN ]]
  6. do
  7. date
  8. $SCRIPT_DIR/chunker
  9. result=$?
  10. if [[ $result -ne 0 ]]
  11. then
  12. date
  13. echo "chunker exited with $result"
  14. exit $result
  15. fi
  16. echo "Sleeping..."
  17. sleep 60
  18. done