mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-26 06:52:37 +00:00
fix shellcheck warnings.
This commit is contained in:
parent
e799ef2977
commit
201aa24448
31
acme.sh
31
acme.sh
@ -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() {
|
|||||||
_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() {
|
|||||||
_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() {
|
|||||||
_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
|
||||||
|
Loading…
Reference in New Issue
Block a user