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
39a56884
Unverified
Commit
39a56884
authored
Aug 28, 2020
by
Jan-Philipp Benecke
Browse files
Make CI happy
parent
e4e6173e
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/cleverreach.sh
View file @
39a56884
...
@@ -52,12 +52,12 @@ cleverreach_deploy() {
...
@@ -52,12 +52,12 @@ cleverreach_deploy() {
_info
"Uploading certificate and key to CleverReach"
_info
"Uploading certificate and key to CleverReach"
_certData
=
"{
\"
cert
\"
:
\"
$(
cat
$_cfullchain
| _json_encode
)
\"
,
\"
key
\"
:
\"
$(
cat
$_ckey
|
_json_encode
)
\"
}"
_certData
=
"{
\"
cert
\"
:
\"
$(
_json_encode <
"
$_cfullchain
"
)
\"
,
\"
key
\"
:
\"
$(
_json_encode
<
"
$_ckey
"
)
\"
}"
export
_H1
=
"Authorization: Bearer
${
_access_token
}
"
export
_H1
=
"Authorization: Bearer
${
_access_token
}
"
_add_cert_result
=
"
$(
_post
"
$_certData
"
"https://rest.cleverreach.com/v3/ssl/
${
_cdomain
}
"
""
"POST"
"application/json"
)
"
_add_cert_result
=
"
$(
_post
"
$_certData
"
"https://rest.cleverreach.com/v3/ssl/
${
_cdomain
}
"
""
"POST"
"application/json"
)
"
_debug
"Destroying token at CleverReach"
_debug
"Destroying token at CleverReach"
_post
""
"https://rest.cleverreach.com/v3/oauth/token.json"
""
"DELETE"
"application/json"
_post
""
"https://rest.cleverreach.com/v3/oauth/token.json"
""
"DELETE"
"application/json"
if
!
echo
"
$_add_cert_result
"
|
grep
'"error":'
>
/dev/null
;
then
if
!
echo
"
$_add_cert_result
"
|
grep
'"error":'
>
/dev/null
;
then
_info
"Uploaded certificate successfully"
_info
"Uploaded certificate successfully"
...
...
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