diff --git a/datafile_gen_daemon_conf.py b/datafile_gen_daemon_conf.py index 1c43f7a3f28c1a98bc2000518b79b6e83921d3ef..a00fb3c9588c6339d3d0ef80936abbb058f53fb7 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 43f46207907cec6025a7eb237b9663f94cece394..d22226540ac11f9a878673fa8d2c56427684685c 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