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
fac4e151
Commit
fac4e151
authored
Feb 08, 2022
by
peter
Browse files
description
parent
dc61c9e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
dnsapi/dns_curanet.sh
View file @
fac4e151
...
...
@@ -83,12 +83,6 @@ dns_curanet_rm() {
recordid
=
$(
echo
"
$response
"
| _egrep_o
"{
\"
id
\"
:[0-9]+,
\"
name
\"
:
\"
$fulldomain
\"
"
| _egrep_o
"id
\"
:[0-9]+"
|
cut
-c
5-
)
re
=
'^[0-9]+$'
if
!
[[
$recordid
=
~
$re
]]
;
then
err
"Unable to delete record (did not find recordID to delete)"
return
1
fi
_debug
"Deleting recordID
$recordid
"
response
=
"
$(
_post
""
"
$CURANET_REST_URL
/
${
_domain
}
/Records/
$recordid
"
""
"DELETE"
)
"
...
...
@@ -108,8 +102,7 @@ gettoken() {
return
1
fi
CURANET_ACCESS_TOKEN
=
$(
echo
"
$response
"
| _egrep_o
"
\"
access_token
\"
:
\"
[^
\"
]+
\"
"
|
cut
-c
17-
)
CURANET_ACCESS_TOKEN
=
${
CURANET_ACCESS_TOKEN
::-1
}
CURANET_ACCESS_TOKEN
=
$(
echo
"
$response
"
| _egrep_o
"
\"
access_token
\"
:
\"
[^
\"
]+"
|
cut
-c
17-
)
}
...
...
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