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() {
...
@@ -227,9 +227,9 @@ _getfield() {
_sep
=
","
_sep
=
","
fi
fi
_ffi
=
$_findex
_ffi
=
"
$_findex
"
while
[
"
$_ffi
"
-gt
"0"
]
;
do
while
[
"
$_ffi
"
-gt
"0"
]
;
do
_fv
=
"
$(
echo
"
$_str
"
|
cut
-d
$_sep
-f
"
$_ffi
"
)
"
_fv
=
"
$(
echo
"
$_str
"
|
cut
-d
"
$_sep
"
-f
"
$_ffi
"
)
"
if
[
"
$_fv
"
]
;
then
if
[
"
$_fv
"
]
;
then
printf
--
"%s"
"
$_fv
"
printf
--
"%s"
"
$_fv
"
return
0
return
0
...
@@ -3006,12 +3006,14 @@ renewAll() {
...
@@ -3006,12 +3006,14 @@ renewAll() {
_debug
"_stopRenewOnError"
"
$_stopRenewOnError
"
_debug
"_stopRenewOnError"
"
$_stopRenewOnError
"
_ret
=
"0"
_ret
=
"0"
for
d
in
$(
ls
-F
${
CERT_HOME
}
/ |
grep
[
^.].
*
[
.].
*
/
$)
;
do
for
d
in
"
${
CERT_HOME
}
"
/
*
.
*
/
;
do
d
=
$(
echo
$d
|
cut
-d
'/'
-f
1
)
_debug d
"
$d
"
d
=
$(
basename
"
$d
"
)
_debug d
"
$d
"
(
(
if
_endswith
$d
"
$ECC_SUFFIX
"
;
then
if
_endswith
"
$d
"
"
$ECC_SUFFIX
"
;
then
_isEcc
=
$(
echo
$d
|
cut
-d
"
$ECC_SEP
"
-f
2
)
_isEcc
=
$(
echo
"
$d
"
|
cut
-d
"
$ECC_SEP
"
-f
2
)
d
=
$(
echo
$d
|
cut
-d
"
$ECC_SEP
"
-f
1
)
d
=
$(
echo
"
$d
"
|
cut
-d
"
$ECC_SEP
"
-f
1
)
fi
fi
renew
"
$d
"
"
$_isEcc
"
renew
"
$d
"
"
$_isEcc
"
)
)
...
@@ -3022,14 +3024,14 @@ renewAll() {
...
@@ -3022,14 +3024,14 @@ renewAll() {
_info
"Skipped
$d
"
_info
"Skipped
$d
"
elif
[
"
$_stopRenewOnError
"
]
;
then
elif
[
"
$_stopRenewOnError
"
]
;
then
_err
"Error renew
$d
, stop now."
_err
"Error renew
$d
, stop now."
return
$rc
return
"
$rc
"
else
else
_ret
=
"
$rc
"
_ret
=
"
$rc
"
_err
"Error renew
$d
, Go ahead to next one."
_err
"Error renew
$d
, Go ahead to next one."
fi
fi
fi
fi
done
done
return
$_ret
return
"
$_ret
"
}
}
#csr webroot
#csr webroot
...
@@ -3127,12 +3129,13 @@ list() {
...
@@ -3127,12 +3129,13 @@ list() {
_sep
=
"|"
_sep
=
"|"
if
[
"
$_raw
"
]
;
then
if
[
"
$_raw
"
]
;
then
printf
"%s
\n
"
"Main_Domain
${
_sep
}
KeyLength
${
_sep
}
SAN_Domains
${
_sep
}
Created
${
_sep
}
Renew"
printf
"%s
\n
"
"Main_Domain
${
_sep
}
KeyLength
${
_sep
}
SAN_Domains
${
_sep
}
Created
${
_sep
}
Renew"
for
d
in
$(
ls
-F
${
CERT_HOME
}
/ |
grep
[
^.].
*
[
.].
*
/
$)
;
do
for
d
in
"
${
CERT_HOME
}
"
/
*
.
*
/
;
do
d
=
$(
echo
$d
|
cut
-d
'/'
-f
1
)
d
=
$(
basename
"
$d
"
)
_debug d
"
$d
"
(
(
if
_endswith
$d
"
$ECC_SUFFIX
"
;
then
if
_endswith
"
$d
"
"
$ECC_SUFFIX
"
;
then
_isEcc
=
$(
echo
$d
|
cut
-d
"
$ECC_SEP
"
-f
2
)
_isEcc
=
$(
echo
"
$d
"
|
cut
-d
"
$ECC_SEP
"
-f
2
)
d
=
$(
echo
$d
|
cut
-d
"
$ECC_SEP
"
-f
1
)
d
=
$(
echo
"
$d
"
|
cut
-d
"
$ECC_SEP
"
-f
1
)
fi
fi
_initpath
$d
"
$_isEcc
"
_initpath
$d
"
$_isEcc
"
if
[
-f
"
$DOMAIN_CONF
"
]
;
then
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