mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-23 15:50: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
|
@ -70,7 +70,7 @@ for CLIENT_NAME in "${CLIENTS_TO_REMOVE[@]}"; do
|
|||
|
||||
re='^[0-9]+$'
|
||||
if [[ ${CLIENT_NAME} =~ $re ]] ; then
|
||||
CLIENT_NAME=${LIST[$(($CLIENT_NAME -1))]}
|
||||
CLIENT_NAME=${LIST[$((CLIENT_NAME -1))]}
|
||||
fi
|
||||
|
||||
if ! grep -q "^${CLIENT_NAME} " configs/clients.txt; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue