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
f82ff90f
Commit
f82ff90f
authored
Aug 11, 2019
by
Тимур Яхин
Committed by
neil
Aug 11, 2019
Browse files
fixed json parse regex for support api gcore_cdn (#2381)
parent
c7849a43
Changes
1
Hide whitespace changes
Inline
Side-by-side
deploy/gcore_cdn.sh
View file @
f82ff90f
#!/usr/bin/env sh
#!/usr/bin/env sh
# Here is the script to deploy the cert to G-Core CDN service (https://gcorelabs.com/ru/) using the G-Core Labs API (https://docs.gcorelabs.com/cdn/).
# Here is the script to deploy the cert to G-Core CDN service (https://gcorelabs.com/ru/) using the G-Core Labs API (https://docs.gcorelabs.com/cdn/).
# Uses command line curl for send requests and jq for parse responses.
# Returns 0 when success.
# Returns 0 when success.
#
#
# Written by temoffey <temofffey@gmail.com>
# Written by temoffey <temofffey@gmail.com>
...
@@ -117,7 +116,7 @@ gcore_cdn_deploy() {
...
@@ -117,7 +116,7 @@ gcore_cdn_deploy() {
_debug _request
"
$_request
"
_debug _request
"
$_request
"
_response
=
$(
_post
"
$_request
"
"https://api.gcdn.co/resources/
$_resourceId
"
''
"PUT"
)
_response
=
$(
_post
"
$_request
"
"https://api.gcdn.co/resources/
$_resourceId
"
''
"PUT"
)
_debug _response
"
$_response
"
_debug _response
"
$_response
"
_regex
=
".*
\"
sslData
\"
:
\(
[0-9]*
\)
}
.*$"
_regex
=
".*
\"
sslData
\"
:
\(
[0-9]*
\)
.*$"
_debug _regex
"
$_regex
"
_debug _regex
"
$_regex
"
_sslDataNew
=
$(
echo
"
$_response
"
|
sed
-n
"s/
$_regex
/
\1
/p"
)
_sslDataNew
=
$(
echo
"
$_response
"
|
sed
-n
"s/
$_regex
/
\1
/p"
)
_debug _sslDataNew
"
$_sslDataNew
"
_debug _sslDataNew
"
$_sslDataNew
"
...
...
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