From fbb36a57107f900df94dfe8ca62788b317b403dc Mon Sep 17 00:00:00 2001 From: Recolic Keghart <root@recolic.net> Date: Tue, 14 May 2019 20:00:41 -0700 Subject: [PATCH] bug fix --- datafile_gen_daemon_conf.py | 1 + do.bash | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/datafile_gen_daemon_conf.py b/datafile_gen_daemon_conf.py index 1c43f7a..a00fb3c 100644 --- a/datafile_gen_daemon_conf.py +++ b/datafile_gen_daemon_conf.py @@ -18,6 +18,7 @@ tests = [ ('./do.bash ddns-wuhan', 'DDNS WuHan'), ('./do.bash ddns-us', 'DDNS USA'), ('./do.bash dl', 'Download Site'), + ('./do.bash shortlink', 'Short Link'), ] test_interval = 20 * 60 # 20min diff --git a/do.bash b/do.bash index 43f4620..d222265 100755 --- a/do.bash +++ b/do.bash @@ -1,6 +1,6 @@ #!/bin/bash -[[ $1 == '' ]] && echo -e 'Usage: '"$0 <operation> ...\n operation := rproxy | drive | ss-tw | ss-us1 | ss-us5 | ss-us6 | ovpn-tw | www | mail | tm | git | zhixiang | mc | push-httpdb-agent | ddns-wuhan | ddns-us | dl | all" && exit 1 +[[ $1 == '' ]] && echo -e 'Usage: '"$0 <operation> ...\n operation := rproxy | drive | ss-tw | ss-us1 | ss-us5 | ss-us6 | ovpn-tw | www | mail | tm | git | zhixiang | mc | push-httpdb-agent | ddns-wuhan | ddns-us | dl | shortlink | all" && exit 1 function confirm_alive () { local host="$1" @@ -115,6 +115,9 @@ function do_test () { dl ) curl -s -L https://dl.recolic.net/ | grep 'Home page is not provided for this download site' || return $? ;; + shortlink ) + curl -s 'https://recolic.net/go/index.php' --data 'target=https%3A%2F%2Fwww.google.com&name=google&super=' | grep Success || return $? + ;; esac @@ -137,6 +140,7 @@ if [[ "$1" = all ]]; then do_test push-httpdb-agent && do_test ddns-wuhan && do_test ddns-us && + do_test shortlink && do_test dl exit $? fi -- GitLab