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
fd1e882e
Commit
fd1e882e
authored
Dec 26, 2015
by
neil
Browse files
less debug info
parent
6c0ab5d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
le.sh
View file @
fd1e882e
...
@@ -26,7 +26,7 @@ API=$DEFAULT_CA
...
@@ -26,7 +26,7 @@ API=$DEFAULT_CA
DEBUG
=
DEBUG
=
_debug
()
{
_debug
()
{
if
!
[
"DEBUG"
]
;
then
if
!
[
"
$
DEBUG
"
]
;
then
return
return
fi
fi
...
@@ -144,8 +144,8 @@ _send_signed_request() {
...
@@ -144,8 +144,8 @@ _send_signed_request() {
needbas64
=
"
$3
"
needbas64
=
"
$3
"
_
info
url
$url
_
debug
url
$url
_
info
payload
"
$payload
"
_
debug
payload
"
$payload
"
CURL_HEADER
=
"
$WORKING_DIR
/curl.header"
CURL_HEADER
=
"
$WORKING_DIR
/curl.header"
dp
=
"
$WORKING_DIR
/curl.dump"
dp
=
"
$WORKING_DIR
/curl.dump"
...
@@ -190,7 +190,7 @@ _send_signed_request() {
...
@@ -190,7 +190,7 @@ _send_signed_request() {
_get
()
{
_get
()
{
url
=
"
$1
"
url
=
"
$1
"
_
info
url
$url
_
debug
url
$url
response
=
$(
curl
--silent
$url
)
response
=
$(
curl
--silent
$url
)
ret
=
$?
ret
=
$?
_debug response
"
$response
"
_debug response
"
$response
"
...
@@ -212,13 +212,13 @@ _setopt() {
...
@@ -212,13 +212,13 @@ _setopt() {
fi
fi
if
grep
-H
-n
"^
$__opt$__sep
"
$__conf
;
then
if
grep
-H
-n
"^
$__opt$__sep
"
$__conf
;
then
echo
OK
_debug
OK
sed
-i
"s|^
$__opt$__sep
.*
$|$__opt$__sep$__val$__end
|"
$__conf
sed
-i
"s|^
$__opt$__sep
.*
$|$__opt$__sep$__val$__end
|"
$__conf
else
else
echo
APP
_debug
APP
echo
"
$__opt$__sep$__val$__end
"
>>
$__conf
echo
"
$__opt$__sep$__val$__end
"
>>
$__conf
fi
fi
grep
-H
-n
"^
$__opt$__sep
"
$__conf
_debug
"
$(
grep
-H
-n
"^
$__opt$__sep
"
$__conf
)
"
}
}
_initpath
()
{
_initpath
()
{
...
@@ -342,10 +342,10 @@ issue() {
...
@@ -342,10 +342,10 @@ issue() {
_debug http01
"
$http01
"
_debug http01
"
$http01
"
token
=
$(
echo
"
$http01
"
|
sed
's/,/\n'
/g|
grep
'"token":'
|
cut
-d
:
-f
2|sed
's/"//g'
)
token
=
$(
echo
"
$http01
"
|
sed
's/,/\n'
/g|
grep
'"token":'
|
cut
-d
:
-f
2|sed
's/"//g'
)
_
info
token
$token
_
debug
token
$token
uri
=
$(
echo
"
$http01
"
|
sed
's/,/\n'
/g|
grep
'"uri":'
|
cut
-d
:
-f
2,3|sed
's/"//g'
)
uri
=
$(
echo
"
$http01
"
|
sed
's/,/\n'
/g|
grep
'"uri":'
|
cut
-d
:
-f
2,3|sed
's/"//g'
)
_
info
uri
$uri
_
debug
uri
$uri
keyauthorization
=
"
$token
.
$thumbprint
"
keyauthorization
=
"
$token
.
$thumbprint
"
_debug keyauthorization
"
$keyauthorization
"
_debug keyauthorization
"
$keyauthorization
"
...
...
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