dns.la official acme script, error fixed

fixed shcheck error
This commit is contained in:
stephen 2022-08-16 09:51:59 +08:00 committed by GitHub
parent 671eecf203
commit 33da8a7f62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -39,12 +39,12 @@ dns_la_add() {
dns_la_rm() {
fulldomain=$1
txtvalue=$2
_fullkey=$(printf "%s" ${fulldomain:16} | tr '.' '_' )
_fullkey=$(printf "%s" "$fulldomain" | awk '{ string=substr($0, 17); print string; }' | tr '.' '_' )
LA_Id="${LA_Id:-$(_readaccountconf_mutable LA_Id)}"
LA_Key="${LA_Key:-$(_readaccountconf_mutable LA_Key)}"
_debug fullkey $_fullkey
RM_recordid="$(_readaccountconf $_fullkey)"
_debug fullkey "$_fullkey"
RM_recordid="$(_readaccountconf "$_fullkey")"
_debug rm_recordid "$RM_recordid"
_debug "detect the root zone"
if ! _get_root "$fulldomain"; then
@ -67,7 +67,7 @@ dns_la_rm() {
return 1
fi
_clearaccountconf $_fullkey
_clearaccountconf "$_fullkey"
_contains "$response" "\"code\":300"
}
@ -88,9 +88,9 @@ add_record() {
if _contains "$response" "\"code\":300"; then
_record_id=$(printf "%s" "$response" | grep '"resultid"' | cut -d : -f 2 | cut -d , -f 1 | tr -d '\r' | tr -d '\n' )
_fullkey=$(printf "%s" ${fulldomain:16} | tr '.' '_' )
_debug fullkey $_fullkey
_saveaccountconf $_fullkey "$_record_id"
_fullkey=$(printf "%s" "$fulldomain" | awk '{ string=substr($0, 17); print string; }' | tr '.' '_' )
_debug fullkey "$_fullkey"
_saveaccountconf "$_fullkey" "$_record_id"
_debug _record_id "$_record_id"
fi
_contains "$response" "\"code\":300"