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
af5c36e4
Commit
af5c36e4
authored
Feb 08, 2022
by
peter
Browse files
shfmt'
parent
a5f943e2
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_curanet.sh
View file @
af5c36e4
...
...
@@ -88,25 +88,19 @@ dns_curanet_rm() {
response
=
"
$(
_post
""
"
$CURANET_REST_URL
/
${
_domain
}
/Records/
$recordid
"
""
"DELETE"
)
"
return
0
;
}
#################### Private functions below ##################################
gettoken
()
{
response
=
"
$(
_post
"grant_type=client_credentials&client_id=
$CURANET_AUTHCLIENTID
&client_secret=
$CURANET_AUTHSECRET
&scope=dns"
"
$CURANET_AUTH_URL
"
""
""
)
"
if
!
_contains
"
$response
"
"access_token"
;
then
_err
"Unable get access token"
return
1
fi
CURANET_ACCESS_TOKEN
=
$(
echo
"
$response
"
| _egrep_o
"
\"
access_token
\"
:
\"
[^
\"
]+"
|
cut
-c
17-
)
}
#_acme-challenge.www.domain.com
#returns
# _domain=domain.com
...
...
@@ -137,4 +131,3 @@ _get_root() {
done
return
1
}
\ No newline at end of file
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