diff --git a/README.md b/README.md index 7a2ddd847609c6b9734a0a41a282f253518e4676..ff27c51653bd711f7d3c47ebdfb4a5c7d21a6815 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Recolic Server Status Monitor + + ## [Click HERE](https://recolic.net/status.html) ## Structure diff --git a/datafile.py.gen.d.py b/datafile.py.gen.d.py index 6bf900fb6c3e3b08ccdc3d49d91860b03a6f882b..f61f191515bf7e67bd2de3fba5a01d1af47bb08f 100755 --- a/datafile.py.gen.d.py +++ b/datafile.py.gen.d.py @@ -24,7 +24,7 @@ def on_broken(tag, desc): curr_time = datetime.datetime.utcnow() msg = desc + ' service went down.' new_event = [tag, curr_time.strftime("%a %d %b %Y %H:%M:%S %p UTC"), msg, curr_time.strftime("%b"),curr_time.strftime("%d"),curr_time.strftime("%Y")] - events.append(new_event) + events = [new_event] + events # latest event first! def save_status(): # diff --git a/do.bash b/do.bash index 5796d9855e0c3d873fc50e741d197936f54a3d5e..656e77817c6f5680e31f6b29fbb361840c245e78 100755 --- a/do.bash +++ b/do.bash @@ -120,31 +120,34 @@ function do_test () { curl -s 'https://recolic.net/go/index.php' --data 'target=https%3A%2F%2Fwww.google.com&name=google&super=' | grep Success || return $? ;; esac +} - +function do_test_twice () { + do_test "$1" || do_test "$1" + return $? } if [[ "$1" = all ]]; then - do_test rproxy && - do_test drive && - do_test ss-tw && - do_test ss-us1 && - do_test ss-us5 && - do_test ss-us6 && - do_test ovpn-tw && - do_test www && - do_test mail && - do_test tm && - do_test git && - do_test zhixiang && - do_test mc && - do_test push-httpdb-agent && - do_test ddns-wuhan && - do_test ddns-us && - do_test shortlink && - do_test dl + do_test_twice rproxy && + do_test_twice drive && + do_test_twice ss-tw && + do_test_twice ss-us1 && + do_test_twice ss-us5 && + do_test_twice ss-us6 && + do_test_twice ovpn-tw && + do_test_twice www && + do_test_twice mail && + do_test_twice tm && + do_test_twice git && + do_test_twice zhixiang && + do_test_twice mc && + do_test_twice push-httpdb-agent && + do_test_twice ddns-wuhan && + do_test_twice ddns-us && + do_test_twice shortlink && + do_test_twice dl exit $? fi -do_test "$1" +do_test_twice "$1" exit $?