bugchecker.sh 389 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. # Periodically call bugcheck.sh script
  3. CHECKER=bugcheck.sh
  4. SLEEPFOR=60
  5. DO_BUGCHECK=0
  6. # So, to enable this, you create an /etc/config/bugcheck file
  7. # with contents like:
  8. # DO_BUGCHECK=1
  9. # export DO_BUGCHECK
  10. if [ -f /etc/config/bugcheck ]
  11. then
  12. . /etc/config/bugcheck
  13. fi
  14. if [ $DO_BUGCHECK == 0 ]
  15. then
  16. exit 0
  17. fi
  18. while true
  19. do
  20. $CHECKER
  21. sleep $SLEEPFOR
  22. done