summaryrefslogtreecommitdiff
path: root/start.sh
diff options
context:
space:
mode:
Diffstat (limited to 'start.sh')
-rwxr-xr-xstart.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/start.sh b/start.sh
new file mode 100755
index 0000000..830eece
--- /dev/null
+++ b/start.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+MM_ACTIVE=1
+
+while [ $MM_ACTIVE != 0 ]
+do
+ echo "Starting tradey...."
+ python2.7 main.py >> error_log.txt
+
+ if [ "$?" != "0" ]; then
+ # Inventory/Money out of sync
+ echo "tradey quit with error at:"
+ date
+ MM_ACTIVE=0
+ else
+ echo "Tradey quit normally, sleeping 60 seconds before a restart"
+ sleep 60
+ fi
+done