mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-22 15:20:11 +00:00
Fixed shellcheck warning SC2004, SC2006, SC2129, SC2219. Issue #1233.
SC2004: "$/${} is unnecessary on arithmetic variables." SC2006: "Use $(...) notation instead of legacy backticked `...`." SC2129: "Consider using { cmd1; cmd2; } >> file instead of individual redirects." SC2219: "Instead of 'let expr', prefer (( expr ))."
This commit is contained in:
parent
d67095f3ef
commit
513c2afc2e
7 changed files with 35 additions and 25 deletions
|
@ -60,7 +60,7 @@ if [[ -z "${CERTS_TO_REVOKE}" ]]; then
|
|||
# Prevent printing "server" certificate
|
||||
CERTS[$i]=$(echo -e "${NAME}")
|
||||
fi
|
||||
let i=i+1
|
||||
((i++))
|
||||
fi
|
||||
done <${INDEX}
|
||||
|
||||
|
@ -82,7 +82,7 @@ if [[ -z "${CERTS_TO_REVOKE}" ]]; then
|
|||
|
||||
re='^[0-9]+$'
|
||||
if [[ ${NAME} =~ $re ]] ; then
|
||||
NAME=${CERTS[$(($NAME))]}
|
||||
NAME=${CERTS[$((NAME))]}
|
||||
fi
|
||||
|
||||
for((x=1;x<=i;++x)); do
|
||||
|
@ -104,7 +104,7 @@ else
|
|||
if [[ "${STATUS}" = "V" ]]; then
|
||||
NAME=$(echo -e "$line" | sed -e 's:.*/CN=::')
|
||||
CERTS[$i]=${NAME}
|
||||
let i=i+1
|
||||
((i++))
|
||||
fi
|
||||
done <${INDEX}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue