Browse Source

Merge branch 'dev' of https://github.com/Neilpang/acme.sh into dev

pull/444/head
neilpang 8 years ago
parent
commit
df62150b5a
  1. 2
      dnsapi/dns_aws.sh
  2. 10
      dnsapi/dns_cx.sh

2
dnsapi/dns_aws.sh

@ -72,7 +72,7 @@ _get_root() {
fi fi
if _contains "$response" "<Name>$h.</Name>"; then if _contains "$response" "<Name>$h.</Name>"; then
hostedzone="$(echo "$response" | _egrep_o "<HostedZone>.*<Name>$h.</Name>.*</HostedZone>")"
hostedzone="$(echo "$response" | sed 's/<HostedZone>/\n&/g' | _egrep_o "<HostedZone>.*<Name>$h.</Name>.*</HostedZone>")"
_debug hostedzone "$hostedzone" _debug hostedzone "$hostedzone"
if [ -z "$hostedzone" ]; then if [ -z "$hostedzone" ]; then
_err "Error, can not get hostedzone." _err "Error, can not get hostedzone."

10
dnsapi/dns_cx.sh

@ -58,7 +58,15 @@ dns_cx_add() {
#fulldomain #fulldomain
dns_cx_rm() { dns_cx_rm() {
fulldomain=$1 fulldomain=$1
REST_API="$CX_Api"
if _get_root "$fulldomain"; then
record_id=""
existing_records "$_domain" "$_sub_domain"
if ! [ "$record_id" = "" ]; then
_rest DELETE "record/$record_id/$_domain_id" "{}"
_info "Deleted record ${fulldomain}"
fi
fi
} }
#usage: root sub #usage: root sub

Loading…
Cancel
Save