Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
19d7c2b3
Commit
19d7c2b3
authored
Jun 06, 2021
by
neil
Browse files
fix bug
parent
afb6c709
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_vultr.sh
View file @
19d7c2b3
...
...
@@ -33,7 +33,7 @@ dns_vultr_add() {
_debug
'Getting txt records'
_vultr_rest GET
"dns/records?domain=
$_domain
"
if
printf
"%s
\n
"
"
$response
"
|
grep
"
\"
type
\"
:
\"
TXT
\"
,
\"
name
\"
:
\"
$fulldomain
\"
"
>
/dev/null
;
then
if
printf
"%s
\n
"
"
$response
"
|
grep
--
"
\"
type
\"
:
\"
TXT
\"
,
\"
name
\"
:
\"
$fulldomain
\"
"
>
/dev/null
;
then
_err
'Error'
return
1
fi
...
...
@@ -73,12 +73,12 @@ dns_vultr_rm() {
_debug
'Getting txt records'
_vultr_rest GET
"dns/records?domain=
$_domain
"
if
printf
"%s
\n
"
"
$response
"
|
grep
"
\"
type
\"
:
\"
TXT
\"
,
\"
name
\"
:
\"
$fulldomain
\"
"
>
/dev/null
;
then
if
printf
"%s
\n
"
"
$response
"
|
grep
--
"
\"
type
\"
:
\"
TXT
\"
,
\"
name
\"
:
\"
$fulldomain
\"
"
>
/dev/null
;
then
_err
'Error'
return
1
fi
_record_id
=
"
$(
echo
"
$response
"
|
tr
'{}'
'\n'
|
grep
'"TXT"'
|
grep
"
$txtvalue
"
|
tr
','
'\n'
|
grep
-i
'RECORDID'
|
cut
-d
:
-f
2
)
"
_record_id
=
"
$(
echo
"
$response
"
|
tr
'{}'
'\n'
|
grep
'"TXT"'
|
grep
--
"
$txtvalue
"
|
tr
','
'\n'
|
grep
-i
'RECORDID'
|
cut
-d
:
-f
2
)
"
_debug _record_id
"
$_record_id
"
if
[
"
$_record_id
"
]
;
then
_info
"Successfully retrieved the record id for ACME challenge."
...
...
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