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
c86631b4
Commit
c86631b4
authored
Oct 04, 2019
by
neilpang
Browse files
json decode the directory content
parent
8ef5daa8
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
c86631b4
...
...
@@ -814,6 +814,11 @@ _json_encode() {
echo "$_j_str" | _hex_dump | _lower_case | sed 's/0a/5c 6e/g' | tr -d ' ' | _h2b | tr -d "\r\n"
}
#convert '\/' to '\'
_json_decode() {
sed 's#\\/#/#g'
}
#options file
_sed_i() {
options="$1"
...
...
@@ -2395,7 +2400,7 @@ _initAPI() {
_debug "_init api for server: $_api_server"
if [ -z "$ACME_NEW_ACCOUNT" ]; then
response
=
$(
_get
"
$_api_server
"
)
response=$(_get "$_api_server"
| _json_decode
)
if [ "$?" != "0" ]; then
_debug2 "response" "$response"
_err "Can not init api."
...
...
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