mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 13:11:41 +00:00
dns.la official acme script, error fixed
fixed shcheck error
This commit is contained in:
parent
671eecf203
commit
33da8a7f62
@ -39,12 +39,12 @@ dns_la_add() {
|
|||||||
dns_la_rm() {
|
dns_la_rm() {
|
||||||
fulldomain=$1
|
fulldomain=$1
|
||||||
txtvalue=$2
|
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_Id="${LA_Id:-$(_readaccountconf_mutable LA_Id)}"
|
||||||
LA_Key="${LA_Key:-$(_readaccountconf_mutable LA_Key)}"
|
LA_Key="${LA_Key:-$(_readaccountconf_mutable LA_Key)}"
|
||||||
_debug fullkey $_fullkey
|
_debug fullkey "$_fullkey"
|
||||||
RM_recordid="$(_readaccountconf $_fullkey)"
|
RM_recordid="$(_readaccountconf "$_fullkey")"
|
||||||
_debug rm_recordid "$RM_recordid"
|
_debug rm_recordid "$RM_recordid"
|
||||||
_debug "detect the root zone"
|
_debug "detect the root zone"
|
||||||
if ! _get_root "$fulldomain"; then
|
if ! _get_root "$fulldomain"; then
|
||||||
@ -67,7 +67,7 @@ dns_la_rm() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_clearaccountconf $_fullkey
|
_clearaccountconf "$_fullkey"
|
||||||
|
|
||||||
_contains "$response" "\"code\":300"
|
_contains "$response" "\"code\":300"
|
||||||
}
|
}
|
||||||
@ -88,9 +88,9 @@ add_record() {
|
|||||||
|
|
||||||
if _contains "$response" "\"code\":300"; then
|
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' )
|
_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 '.' '_' )
|
_fullkey=$(printf "%s" "$fulldomain" | awk '{ string=substr($0, 17); print string; }' | tr '.' '_' )
|
||||||
_debug fullkey $_fullkey
|
_debug fullkey "$_fullkey"
|
||||||
_saveaccountconf $_fullkey "$_record_id"
|
_saveaccountconf "$_fullkey" "$_record_id"
|
||||||
_debug _record_id "$_record_id"
|
_debug _record_id "$_record_id"
|
||||||
fi
|
fi
|
||||||
_contains "$response" "\"code\":300"
|
_contains "$response" "\"code\":300"
|
||||||
|
Loading…
Reference in New Issue
Block a user