start.sh 379 B

12345678910111213141516171819
  1. #!/bin/bash
  2. MM_ACTIVE=1
  3. while [ $MM_ACTIVE != 0 ]
  4. do
  5. echo "Starting tradey...."
  6. python2.7 main.py >> error_log.txt
  7. if [ "$?" != "0" ]; then
  8. # Inventory/Money out of sync
  9. echo "tradey quit with error at:"
  10. date
  11. MM_ACTIVE=0
  12. else
  13. echo "Tradey quit normally, sleeping 60 seconds before a restart"
  14. sleep 60
  15. fi
  16. done