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
dcf9cb58
Commit
dcf9cb58
authored
Jul 15, 2016
by
neil
Browse files
minor, add more debug info
parent
1a6305c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
dcf9cb58
#!/usr/bin/env sh
#!/usr/bin/env sh
VER
=
2.3.
1
VER
=
2.3.
2
PROJECT_NAME
=
"acme.sh"
PROJECT_NAME
=
"acme.sh"
...
@@ -902,9 +902,23 @@ _stopserver(){
...
@@ -902,9 +902,23 @@ _stopserver(){
return
return
fi
fi
_get
"http://localhost:
$Le_HTTPPort
"
>
/dev/null 2>&1
_debug2
"Le_HTTPPort"
"
$Le_HTTPPort
"
_get
"https://localhost:
$Le_TLSPort
"
>
/dev/null 2>&1
if
[
"
$Le_HTTPPort
"
]
;
then
if
[
"
$DEBUG
"
]
;
then
_get
"http://localhost:
$Le_HTTPPort
"
else
_get
"http://localhost:
$Le_HTTPPort
"
>
/dev/null 2>&1
fi
fi
_debug2
"Le_TLSPort"
"
$Le_TLSPort
"
if
[
"
$Le_TLSPort
"
]
;
then
if
[
"
$DEBUG
"
]
;
then
_get
"https://localhost:
$Le_TLSPort
"
else
_get
"https://localhost:
$Le_TLSPort
"
>
/dev/null 2>&1
fi
fi
}
}
...
@@ -1244,19 +1258,25 @@ _clearupwebbroot() {
...
@@ -1244,19 +1258,25 @@ _clearupwebbroot() {
return
0
return
0
fi
fi
_rmpath
=
""
if
[
"
$2
"
=
'1'
]
;
then
if
[
"
$2
"
=
'1'
]
;
then
_debug
"remove
$__webroot
/.well-known"
_rmpath
=
"
$__webroot
/.well-known"
rm
-rf
"
$__webroot
/.well-known"
elif
[
"
$2
"
=
'2'
]
;
then
elif
[
"
$2
"
=
'2'
]
;
then
_debug
"remove
$__webroot
/.well-known/acme-challenge"
_rmpath
=
"
$__webroot
/.well-known/acme-challenge"
rm
-rf
"
$__webroot
/.well-known/acme-challenge"
elif
[
"
$2
"
=
'3'
]
;
then
elif
[
"
$2
"
=
'3'
]
;
then
_debug
"remove
$__webroot
/.well-known/acme-challenge/
$3
"
_rmpath
=
"
$__webroot
/.well-known/acme-challenge/
$3
"
rm
-rf
"
$__webroot
/.well-known/acme-challenge/
$3
"
else
else
_debug
"Skip for removelevel:
$2
"
_debug
"Skip for removelevel:
$2
"
fi
fi
if
[
"
$_rmpath
"
]
;
then
if
[
"
$DEBUG
"
]
;
then
_debug
"Debugging, skip removing:
$_rmpath
"
else
rm
-rf
"
$_rmpath
"
fi
fi
return
0
return
0
}
}
...
@@ -1735,6 +1755,11 @@ issue() {
...
@@ -1735,6 +1755,11 @@ issue() {
else
else
_err
"
$d
:Verify error:
$error
"
_err
"
$d
:Verify error:
$error
"
fi
fi
if
[
"
$DEBUG
"
]
;
then
if
[
"
$vtype
"
=
"
$VTYPE_HTTP
"
]
;
then
_get
"http://
$d
/.well-known/acme-challenge/
$token
"
fi
fi
_clearupwebbroot
"
$_currentRoot
"
"
$removelevel
"
"
$token
"
_clearupwebbroot
"
$_currentRoot
"
"
$removelevel
"
"
$token
"
_clearup
_clearup
return
1
;
return
1
;
...
@@ -2806,6 +2831,9 @@ _process() {
...
@@ -2806,6 +2831,9 @@ _process() {
shift
1
shift
1
done
done
if
[
"
$DEBUG
"
]
;
then
version
fi
case
"
${
_CMD
}
"
in
case
"
${
_CMD
}
"
in
install
)
install
"
$_nocron
"
;;
install
)
install
"
$_nocron
"
;;
...
...
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