From 0fce81e02e8849195208ca6faba7829658736d68 Mon Sep 17 00:00:00 2001 From: devn0ll Date: Mon, 8 Aug 2016 22:14:43 +0200 Subject: [PATCH 1/2] Add files via upload modified run script wich let you run the boot in a loop(if it crashes it restarts) --- run_loop.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 run_loop.sh diff --git a/run_loop.sh b/run_loop.sh new file mode 100644 index 0000000000..efdca1856f --- /dev/null +++ b/run_loop.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Starts PokemonGo-Bot +config="" + +if [ ! -z $1 ]; then + config=$1 +else + config="./configs/config.json" + if [ ! -f ${config} ]; then + echo -e "There's no ./configs/config.json file" + echo -e "Please create one or use another config file" + echo -e "./run.sh [path/to/config/file]" + exit 1 + fi +fi +while [ true ] +do +python pokecli.py --config ${config} +echo "##################################" +echo "##Exit two times to end the loop##" +echo "##################################" +sleep "10" +done From 4318a72fc1e59d90896b2ac9dc97062a0255b0c7 Mon Sep 17 00:00:00 2001 From: devn0ll Date: Tue, 9 Aug 2016 00:16:51 +0200 Subject: [PATCH 2/2] Integreated Loop into run.sh modified run.sh to loop the script so that even if it crashes it automaticly restarts. --- run.sh | 8 ++++++++ run_loop.sh | 24 ------------------------ 2 files changed, 8 insertions(+), 24 deletions(-) delete mode 100644 run_loop.sh diff --git a/run.sh b/run.sh index ec95acb3e3..d7ef7079b7 100755 --- a/run.sh +++ b/run.sh @@ -15,4 +15,12 @@ else fi fi +while [ true ] +do +echo "###############################################" +echo "##Exit two times with [Ctl+C] to end the loop##" +echo "###############################################" +sleep 1 python pokecli.py --config ${config} +sleep "10" +done diff --git a/run_loop.sh b/run_loop.sh deleted file mode 100644 index efdca1856f..0000000000 --- a/run_loop.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -# Starts PokemonGo-Bot -config="" - -if [ ! -z $1 ]; then - config=$1 -else - config="./configs/config.json" - if [ ! -f ${config} ]; then - echo -e "There's no ./configs/config.json file" - echo -e "Please create one or use another config file" - echo -e "./run.sh [path/to/config/file]" - exit 1 - fi -fi -while [ true ] -do -python pokecli.py --config ${config} -echo "##################################" -echo "##Exit two times to end the loop##" -echo "##################################" -sleep "10" -done