mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 10:50:16 +00:00
Shellcheck compliance
scripts/wireguard/disableCONF.sh * SC1090: ShellCheck can't follow non-constant source. Use a directive to specify location. * Disabled warning * SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting). * Added double quotes * SC2086: Double quote to prevent globbing and word splitting. * Added double quotes
This commit is contained in:
parent
8bd867894a
commit
fb71fdd9fd
1 changed files with 4 additions and 3 deletions
|
@ -7,6 +7,7 @@ if [ ! -f "${setupVars}" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
source "${setupVars}"
|
||||
|
||||
helpFunc(){
|
||||
|
@ -57,13 +58,13 @@ if [ "$DISPLAY_DISABLED" ]; then
|
|||
fi
|
||||
|
||||
|
||||
LIST=($(awk '{print $1}' configs/clients.txt))
|
||||
LIST=("$(awk '{print $1}' configs/clients.txt)")
|
||||
if [ "${#CLIENTS_TO_CHANGE[@]}" -eq 0 ]; then
|
||||
echo -e "::\e[4m Client list \e[0m::"
|
||||
len=${#LIST[@]}
|
||||
COUNTER=1
|
||||
while [ $COUNTER -le ${len} ]; do
|
||||
printf "%0${#len}s) %s\r\n" ${COUNTER} ${LIST[(($COUNTER-1))]}
|
||||
while [ $COUNTER -le "${len}" ]; do
|
||||
printf "%0${#len}s) %s\r\n" "${COUNTER}" "${LIST[(($COUNTER-1))]}"
|
||||
((COUNTER++))
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue