|
|
@ -42,7 +42,7 @@ dns_aws_add() { |
|
|
|
_aws_tmpl_xml="<ChangeResourceRecordSetsRequest xmlns=\"https://route53.amazonaws.com/doc/2013-04-01/\"><ChangeBatch><Changes><Change><Action>UPSERT</Action><ResourceRecordSet><Name>$fulldomain</Name><Type>TXT</Type><TTL>300</TTL><ResourceRecords><ResourceRecord><Value>\"$txtvalue\"</Value></ResourceRecord></ResourceRecords></ResourceRecordSet></Change></Changes></ChangeBatch></ChangeResourceRecordSetsRequest>" |
|
|
|
|
|
|
|
if aws_rest POST "2013-04-01$_domain_id/rrset/" "" "$_aws_tmpl_xml" && _contains "$response" "ChangeResourceRecordSetsResponse"; then |
|
|
|
_info "txt record updated sucess." |
|
|
|
_info "txt record updated success." |
|
|
|
return 0 |
|
|
|
fi |
|
|
|
|
|
|
@ -66,7 +66,7 @@ dns_aws_rm() { |
|
|
|
_aws_tmpl_xml="<ChangeResourceRecordSetsRequest xmlns=\"https://route53.amazonaws.com/doc/2013-04-01/\"><ChangeBatch><Changes><Change><Action>DELETE</Action><ResourceRecordSet><ResourceRecords><ResourceRecord><Value>\"$txtvalue\"</Value></ResourceRecord></ResourceRecords><Name>$fulldomain.</Name><Type>TXT</Type><TTL>300</TTL></ResourceRecordSet></Change></Changes></ChangeBatch></ChangeResourceRecordSetsRequest>" |
|
|
|
|
|
|
|
if aws_rest POST "2013-04-01$_domain_id/rrset/" "" "$_aws_tmpl_xml" && _contains "$response" "ChangeResourceRecordSetsResponse"; then |
|
|
|
_info "txt record deleted sucess." |
|
|
|
_info "txt record deleted success." |
|
|
|
return 0 |
|
|
|
fi |
|
|
|
|
|
|
@ -74,7 +74,7 @@ dns_aws_rm() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#################### Private functions bellow ################################## |
|
|
|
#################### Private functions below ################################## |
|
|
|
|
|
|
|
_get_root() { |
|
|
|
domain=$1 |
|
|
|