Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
79b4907c
Commit
79b4907c
authored
Dec 06, 2016
by
neil
Committed by
GitHub
Dec 06, 2016
Browse files
Merge pull request #449 from Neilpang/dev
support aws remove
parents
b23d5e26
dfbc244b
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_aws.sh
View file @
79b4907c
...
@@ -49,9 +49,28 @@ dns_aws_add() {
...
@@ -49,9 +49,28 @@ dns_aws_add() {
return
1
return
1
}
}
#fulldomain
#fulldomain
txtvalue
dns_aws_rm
()
{
dns_aws_rm
()
{
fulldomain
=
$1
fulldomain
=
$1
txtvalue
=
$2
_debug
"First detect the root zone"
if
!
_get_root
"
$fulldomain
"
;
then
_err
"invalid domain"
return
1
fi
_debug _domain_id
"
$_domain_id
"
_debug _sub_domain
"
$_sub_domain
"
_debug _domain
"
$_domain
"
_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."
return
0
fi
return
1
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment