neil
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
7 additions and
4 deletions
-
acme.sh
-
deploy/gcore_cdn.sh
-
dnsapi/dns_cf.sh
|
@ -2004,7 +2004,10 @@ _read_conf() { |
|
|
_r_c_f="$1" |
|
|
_r_c_f="$1" |
|
|
_sdkey="$2" |
|
|
_sdkey="$2" |
|
|
if [ -f "$_r_c_f" ]; then |
|
|
if [ -f "$_r_c_f" ]; then |
|
|
_sdv="$(grep "^$_sdkey *=" "$_r_c_f" | cut -d = -f 2-1000 | tr -d "'")" |
|
|
|
|
|
|
|
|
_sdv="$( |
|
|
|
|
|
eval "$(grep "^$_sdkey *=" "$_r_c_f")" |
|
|
|
|
|
eval "printf \"%s\" \"\$$_sdkey\"" |
|
|
|
|
|
)" |
|
|
if _startswith "$_sdv" "${B64CONF_START}" && _endswith "$_sdv" "${B64CONF_END}"; then |
|
|
if _startswith "$_sdv" "${B64CONF_START}" && _endswith "$_sdv" "${B64CONF_END}"; then |
|
|
_sdv="$(echo "$_sdv" | sed "s/${B64CONF_START}//" | sed "s/${B64CONF_END}//" | _dbase64)" |
|
|
_sdv="$(echo "$_sdv" | sed "s/${B64CONF_START}//" | sed "s/${B64CONF_END}//" | _dbase64)" |
|
|
fi |
|
|
fi |
|
|
|
@ -74,9 +74,9 @@ gcore_cdn_deploy() { |
|
|
_response=$(_get "https://api.gcdn.co/resources") |
|
|
_response=$(_get "https://api.gcdn.co/resources") |
|
|
_debug _response "$_response" |
|
|
_debug _response "$_response" |
|
|
_regex=".*(\"id\".*?\"cname\":\"$_cdomain\".*?})" |
|
|
_regex=".*(\"id\".*?\"cname\":\"$_cdomain\".*?})" |
|
|
_regex="\"cname\":\"$_cdomain\"" |
|
|
|
|
|
|
|
|
_regex="^.*\"cname\":\"$_cdomain\".*$" |
|
|
_debug _regex "$_regex" |
|
|
_debug _regex "$_regex" |
|
|
_resource=$(echo "$_response" | sed 's/},{/},\n{/g' | grep -E "$_regex") |
|
|
|
|
|
|
|
|
_resource=$(echo "$_response" | sed 's/},{/},\n{/g' | _egrep_o "$_regex") |
|
|
_debug _resource "$_resource" |
|
|
_debug _resource "$_resource" |
|
|
_regex=".*\"id\":\([0-9]*\),.*$" |
|
|
_regex=".*\"id\":\([0-9]*\),.*$" |
|
|
_debug _regex "$_regex" |
|
|
_debug _regex "$_regex" |
|
|
|
@ -147,7 +147,7 @@ dns_cf_rm() { |
|
|
# _domain_id=sdjkglgdfewsdfg |
|
|
# _domain_id=sdjkglgdfewsdfg |
|
|
_get_root() { |
|
|
_get_root() { |
|
|
domain=$1 |
|
|
domain=$1 |
|
|
i=2 |
|
|
|
|
|
|
|
|
i=1 |
|
|
p=1 |
|
|
p=1 |
|
|
while true; do |
|
|
while true; do |
|
|
h=$(printf "%s" "$domain" | cut -d . -f $i-100) |
|
|
h=$(printf "%s" "$domain" | cut -d . -f $i-100) |
|
|