Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
d0d74907
Commit
d0d74907
authored
Mar 16, 2019
by
neilpang
Browse files
fix for solaris
parent
dbc44c08
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
d0d74907
...
...
@@ -4194,7 +4194,7 @@ $_authorizations_map"
fi
if
[
"
$status
"
=
"invalid"
]
;
then
error
=
"
$(
echo
"
$response
"
|
tr
-d
"
\r\n
"
|
_egrep_o
'"error":\{[^\}]*'
)
"
error
=
"
$(
echo
"
$response
"
| _egrep_o
'"error":\{[^\}]*'
)
"
_debug2 error
"
$error
"
errordetail
=
"
$(
echo
"
$error
"
| _egrep_o
'"detail": *"[^"]*'
|
cut
-d
'"'
-f
4
)
"
_debug2 errordetail
"
$errordetail
"
...
...
@@ -4260,7 +4260,7 @@ $_authorizations_map"
while
[
"
$_link_cert_retry
"
-lt
"
$_MAX_CERT_RETRY
"
]
;
do
if
_contains
"
$response
"
"
\"
status
\"
:
\"
valid
\"
"
;
then
_debug
"Order status is valid."
Le_LinkCert
=
"
$(
echo
"
$response
"
|
tr
-d
'\r\n'
|
_egrep_o
'"certificate" *: *"[^"]*"'
|
cut
-d
'"'
-f
4
)
"
Le_LinkCert
=
"
$(
echo
"
$response
"
| _egrep_o
'"certificate" *: *"[^"]*"'
|
cut
-d
'"'
-f
4
)
"
_debug Le_LinkCert
"
$Le_LinkCert
"
if
[
-z
"
$Le_LinkCert
"
]
;
then
_err
"Sign error, can not find Le_LinkCert"
...
...
@@ -5195,7 +5195,7 @@ _deactivate() {
_err
"Can not get domain new order."
return
1
fi
_authorizations_seg
=
"
$(
echo
"
$response
"
|
tr
-d
'\r\n'
|
_egrep_o
'"authorizations" *: *\[[^\]*\]'
|
cut
-d
'['
-f
2 |
tr
-d
']'
|
tr
-d
'"'
)
"
_authorizations_seg
=
"
$(
echo
"
$response
"
| _egrep_o
'"authorizations" *: *\[[^\]*\]'
|
cut
-d
'['
-f
2 |
tr
-d
']'
|
tr
-d
'"'
)
"
_debug2 _authorizations_seg
"
$_authorizations_seg
"
if
[
-z
"
$_authorizations_seg
"
]
;
then
_err
"_authorizations_seg not found."
...
...
@@ -5241,16 +5241,16 @@ _deactivate() {
fi
_debug
"Trigger validation."
vtype
=
"
$VTYPE_DNS
"
entry
=
"
$(
printf
"%s
\n
"
"
$response
"
| _egrep_o
'[^\{]*"type":"'
$vtype
'"[^\}]*'
)
"
entry
=
"
$(
echo
"
$response
"
| _egrep_o
'[^\{]*"type":"'
$vtype
'"[^\}]*'
)
"
_debug entry
"
$entry
"
if
[
-z
"
$entry
"
]
;
then
_err
"Error, can not get domain token
$d
"
return
1
fi
token
=
"
$(
printf
"%s
\n
"
"
$entry
"
| _egrep_o
'"token":"[^"]*'
|
cut
-d
:
-f
2 |
tr
-d
'"'
)
"
token
=
"
$(
echo
"
$entry
"
| _egrep_o
'"token":"[^"]*'
|
cut
-d
:
-f
2 |
tr
-d
'"'
)
"
_debug token
"
$token
"
uri
=
"
$(
printf
"%s
\n
"
"
$entry
"
| _egrep_o
"
\"
$_URL_NAME
\"
:
\"
[^
\"
]*"
|
cut
-d
:
-f
2,3 |
tr
-d
'"'
)
"
uri
=
"
$(
echo
"
$entry
"
| _egrep_o
"
\"
$_URL_NAME
\"
:
\"
[^
\"
]*"
|
cut
-d
:
-f
2,3 |
tr
-d
'"'
)
"
_debug uri
"
$uri
"
keyauthorization
=
"
$token
.
$thumbprint
"
...
...
@@ -5272,11 +5272,11 @@ _deactivate() {
break
fi
_vtype
=
"
$(
printf
"%s
\n
"
"
$entry
"
| _egrep_o
'"type": *"[^"]*"'
|
cut
-d
:
-f
2 |
tr
-d
'"'
)
"
_vtype
=
"
$(
echo
"
$entry
"
| _egrep_o
'"type": *"[^"]*"'
|
cut
-d
:
-f
2 |
tr
-d
'"'
)
"
_debug _vtype
"
$_vtype
"
_info
"Found
$_vtype
"
uri
=
"
$(
printf
"%s
\n
"
"
$entry
"
| _egrep_o
"
\"
$_URL_NAME
\"
:
\"
[^
\"
]*"
|
cut
-d
:
-f
2,3 |
tr
-d
'"'
)
"
uri
=
"
$(
echo
"
$entry
"
| _egrep_o
"
\"
$_URL_NAME
\"
:
\"
[^
\"
]*"
|
cut
-d
:
-f
2,3 |
tr
-d
'"'
)
"
_debug uri
"
$uri
"
if
[
"
$_d_type
"
]
&&
[
"
$_d_type
"
!=
"
$_vtype
"
]
;
then
...
...
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