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
201aa244
Commit
201aa244
authored
Nov 09, 2016
by
neilpang
Browse files
fix shellcheck warnings.
parent
e799ef29
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
201aa244
...
...
@@ -227,9 +227,9 @@ _getfield() {
_sep=","
fi
_ffi
=
$_findex
_ffi=
"
$_findex
"
while [ "$_ffi" -gt "0" ]; do
_fv
=
"
$(
echo
"
$_str
"
|
cut
-d
$_sep
-f
"
$_ffi
"
)
"
_fv="$(echo "$_str" | cut -d
"
$_sep
"
-f "$_ffi")"
if [ "$_fv" ]; then
printf -- "%s" "$_fv"
return 0
...
...
@@ -3006,12 +3006,14 @@ renewAll() {
_debug "_stopRenewOnError" "$_stopRenewOnError"
_ret="0"
for
d
in
$(
ls
-F
${
CERT_HOME
}
/ |
grep
[
^.].
*
[
.].
*
/
$)
;
do
d
=
$(
echo
$d
|
cut
-d
'/'
-f
1
)
for d in "${CERT_HOME}"/*.*/; do
_debug d "$d"
d=$(basename "$d")
_debug d "$d"
(
if
_endswith
$d
"
$ECC_SUFFIX
"
;
then
_isEcc
=
$(
echo
$d
|
cut
-d
"
$ECC_SEP
"
-f
2
)
d
=
$(
echo
$d
|
cut
-d
"
$ECC_SEP
"
-f
1
)
if _endswith
"
$d
"
"$ECC_SUFFIX"; then
_isEcc=$(echo
"
$d
"
| cut -d "$ECC_SEP" -f 2)
d=$(echo
"
$d
"
| cut -d "$ECC_SEP" -f 1)
fi
renew "$d" "$_isEcc"
)
...
...
@@ -3022,14 +3024,14 @@ renewAll() {
_info "Skipped $d"
elif [ "$_stopRenewOnError" ]; then
_err "Error renew $d, stop now."
return
$rc
return
"
$rc
"
else
_ret="$rc"
_err "Error renew $d, Go ahead to next one."
fi
fi
done
return
$_ret
return
"
$_ret
"
}
#csr webroot
...
...
@@ -3127,12 +3129,13 @@ list() {
_sep="|"
if [ "$_raw" ]; then
printf "%s\n" "Main_Domain${_sep}KeyLength${_sep}SAN_Domains${_sep}Created${_sep}Renew"
for
d
in
$(
ls
-F
${
CERT_HOME
}
/ |
grep
[
^.].
*
[
.].
*
/
$)
;
do
d
=
$(
echo
$d
|
cut
-d
'/'
-f
1
)
for d in "${CERT_HOME}"/*.*/; do
d=$(basename "$d")
_debug d "$d"
(
if
_endswith
$d
"
$ECC_SUFFIX
"
;
then
_isEcc
=
$(
echo
$d
|
cut
-d
"
$ECC_SEP
"
-f
2
)
d
=
$(
echo
$d
|
cut
-d
"
$ECC_SEP
"
-f
1
)
if _endswith
"
$d
"
"$ECC_SUFFIX"; then
_isEcc=$(echo
"
$d
"
| cut -d "$ECC_SEP" -f 2)
d=$(echo
"
$d
"
| cut -d "$ECC_SEP" -f 1)
fi
_initpath $d "$_isEcc"
if [ -f "$DOMAIN_CONF" ]; 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