mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-16 19:31:50 +00:00
fix format
This commit is contained in:
parent
6ae3911972
commit
4f3b3a273f
@ -51,11 +51,11 @@ dns_cf_add() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# For wildcard cert, the main root domain and the wildcard domain have the same txt subdomain name, so
|
# For wildcard cert, the main root domain and the wildcard domain have the same txt subdomain name, so
|
||||||
# we can not use updating anymore.
|
# we can not use updating anymore.
|
||||||
# count=$(printf "%s\n" "$response" | _egrep_o "\"count\":[^,]*" | cut -d : -f 2)
|
# count=$(printf "%s\n" "$response" | _egrep_o "\"count\":[^,]*" | cut -d : -f 2)
|
||||||
# _debug count "$count"
|
# _debug count "$count"
|
||||||
# if [ "$count" = "0" ]; then
|
# if [ "$count" = "0" ]; then
|
||||||
_info "Adding record"
|
_info "Adding record"
|
||||||
if _cf_rest POST "zones/$_domain_id/dns_records" "{\"type\":\"TXT\",\"name\":\"$fulldomain\",\"content\":\"$txtvalue\",\"ttl\":120}"; then
|
if _cf_rest POST "zones/$_domain_id/dns_records" "{\"type\":\"TXT\",\"name\":\"$fulldomain\",\"content\":\"$txtvalue\",\"ttl\":120}"; then
|
||||||
if printf -- "%s" "$response" | grep "$fulldomain" >/dev/null; then
|
if printf -- "%s" "$response" | grep "$fulldomain" >/dev/null; then
|
||||||
@ -68,19 +68,19 @@ dns_cf_add() {
|
|||||||
fi
|
fi
|
||||||
_err "Add txt record error."
|
_err "Add txt record error."
|
||||||
return 1
|
return 1
|
||||||
# else
|
# else
|
||||||
# _info "Updating record"
|
# _info "Updating record"
|
||||||
# record_id=$(printf "%s\n" "$response" | _egrep_o "\"id\":\"[^\"]*\"" | cut -d : -f 2 | tr -d \" | head -n 1)
|
# record_id=$(printf "%s\n" "$response" | _egrep_o "\"id\":\"[^\"]*\"" | cut -d : -f 2 | tr -d \" | head -n 1)
|
||||||
# _debug "record_id" "$record_id"
|
# _debug "record_id" "$record_id"
|
||||||
#
|
#
|
||||||
# _cf_rest PUT "zones/$_domain_id/dns_records/$record_id" "{\"id\":\"$record_id\",\"type\":\"TXT\",\"name\":\"$fulldomain\",\"content\":\"$txtvalue\",\"zone_id\":\"$_domain_id\",\"zone_name\":\"$_domain\"}"
|
# _cf_rest PUT "zones/$_domain_id/dns_records/$record_id" "{\"id\":\"$record_id\",\"type\":\"TXT\",\"name\":\"$fulldomain\",\"content\":\"$txtvalue\",\"zone_id\":\"$_domain_id\",\"zone_name\":\"$_domain\"}"
|
||||||
# if [ "$?" = "0" ]; then
|
# if [ "$?" = "0" ]; then
|
||||||
# _info "Updated, OK"
|
# _info "Updated, OK"
|
||||||
# return 0
|
# return 0
|
||||||
# fi
|
# fi
|
||||||
# _err "Update error"
|
# _err "Update error"
|
||||||
# return 1
|
# return 1
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user