If your DNS provider is not on the supported list above, you can write your own DNS API script easily. If you do, please consider submitting a [Pull Request](https://github.com/Neilpang/acme.sh/pulls) and contribute it to the project.
...
...
@@ -337,7 +340,7 @@ For more details: [How to use DNS API](dnsapi)
# 9. Use DNS manual mode:
If your dns provider doesn't support any api access, you will have to add the txt record by your hand.
If your dns provider doesn't support any api access, you can add the txt record by your hand.
if _contains "$response""Action completed successful";then
return 0
fi
return 1 #error
}
#update the txt record
#Usage: root sub txtvalue
update_record(){
root=$1
sub=$2
txtvalue=$3
fulldomain="$sub.$root"
_info "Updating record"
if! _rest POST "Record.Modify""login_token=$DP_Id,$DP_Key&format=json&domain_id=$_domain_id&sub_domain=$_sub_domain&record_type=TXT&value=$txtvalue&record_line=默认&record_id=$record_id";then
return 1
fi
if _contains "$response""Action completed successful";then
return 0
fi
return 1 #error
_contains "$response""Action completed successful"|| _contains "$response""Domain record already exists"
_LUA_rest PUT "zones/$_domain_id/records/$record_id""{\"id\":$record_id,\"type\":\"TXT\",\"name\":\"$fulldomain.\",\"content\":\"$txtvalue\",\"zone_id\":$_domain_id,\"ttl\":120}"