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
41e3ecad
Commit
41e3ecad
authored
Feb 19, 2018
by
Boyan Peychev
Browse files
Update dns api to support v2 wildcard cert #1261
parent
94b925f5
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_cloudns.sh
View file @
41e3ecad
...
...
@@ -26,14 +26,11 @@ dns_cloudns_add() {
host
=
"
$(
echo
"
$1
"
|
sed
"s/
\.
$zone
\$
//"
)
"
record
=
$2
record_id
=
$(
_dns_cloudns_get_record_id
"
$zone
"
"
$host
"
)
_debug zone
"
$zone
"
_debug host
"
$host
"
_debug record
"
$record
"
_debug record_id
"
$record_id
"
if
[
-z
"
$record_id
"
]
;
then
_info
"Adding the TXT record for
$1
"
_dns_cloudns_http_api_call
"dns/add-record.json"
"domain-name=
$zone
&record-type=TXT&host=
$host
&record=
$record
&ttl=60"
if
!
_contains
"
$response
"
"
\"
status
\"
:
\"
Success
\"
"
;
then
...
...
@@ -41,15 +38,6 @@ dns_cloudns_add() {
return
1
fi
_info
"Added."
else
_info
"Updating the TXT record for
$1
"
_dns_cloudns_http_api_call
"dns/mod-record.json"
"domain-name=
$zone
&record-id=
$record_id
&record-type=TXT&host=
$host
&record=
$record
&ttl=60"
if
!
_contains
"
$response
"
"
\"
status
\"
:
\"
Success
\"
"
;
then
_err
"The TXT record for
$1
cannot be updated."
return
1
fi
_info
"Updated."
fi
return
0
}
...
...
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