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
4ec39ab7
Unverified
Commit
4ec39ab7
authored
Jan 12, 2019
by
shonenada
Browse files
replace with functions defined in acme.sh
parent
d2a60f3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/qiniu.sh
View file @
4ec39ab7
...
@@ -72,7 +72,7 @@ qiniu_deploy() {
...
@@ -72,7 +72,7 @@ qiniu_deploy() {
update_access_token
=
"
$(
_make_sslcreate_access_token
"
$update_path
"
)
"
update_access_token
=
"
$(
_make_sslcreate_access_token
"
$update_path
"
)
"
_debug update_access_token
"
$update_access_token
"
_debug update_access_token
"
$update_access_token
"
export
_H1
=
"Authorization: QBox
$update_access_token
"
export
_H1
=
"Authorization: QBox
$update_access_token
"
update_response
=
$(
_post
"
$update_body
"
"
$QINIU_API_BASE$update_
body
"
0
"PUT"
"application/json"
| _dbase64
"multiline"
)
update_response
=
$(
_post
"
$update_body
"
"
$QINIU_API_BASE$update_
path
"
0
"PUT"
"application/json"
| _dbase64
"multiline"
)
err_response
=
"error"
err_response
=
"error"
if
test
"
${
update_response
#*
$err_response
}
"
!=
"
$update_response
"
;
then
if
test
"
${
update_response
#*
$err_response
}
"
!=
"
$update_response
"
;
then
...
@@ -88,7 +88,6 @@ qiniu_deploy() {
...
@@ -88,7 +88,6 @@ qiniu_deploy() {
}
}
_make_sslcreate_access_token
()
{
_make_sslcreate_access_token
()
{
_data
=
"
$1
\\
n"
_token
=
"
$(
printf
"%s
\\
n"
"
$1
"
| _hmac
"sha1"
"
$(
printf
"%s"
"
$Le_Deploy_Qiniu_SK
"
| _hex_dump |
tr
-d
" "
)
"
| _base64
)
"
_token
=
"
$(
printf
"%s"
"
$_data
"
| openssl sha1
-hmac
"
$Le_Deploy_Qiniu_SK
"
-binary
| openssl
base64
-e
)
"
echo
"
$Le_Deploy_Qiniu_AK
:
$_token
"
echo
"
$Le_Deploy_Qiniu_AK
:
$_token
"
}
}
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