mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-23 07:40:11 +00:00
Shellcheck compliance
scripts/wireguard/disableCONF.sh * Mapfile instead of double quoted LIST=("$(...)") scripts/wireguard/enableCONF.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). * Changed to mapfile * SC2086: Double quote to prevent globbing and word splitting. * Added double quotes
This commit is contained in:
parent
fb71fdd9fd
commit
2a78fce9d3
2 changed files with 6 additions and 5 deletions
|
@ -58,7 +58,7 @@ if [ "$DISPLAY_DISABLED" ]; then
|
|||
fi
|
||||
|
||||
|
||||
LIST=("$(awk '{print $1}' configs/clients.txt)")
|
||||
mapfile -t LIST < <(awk '{print $1}' configs/clients.txt)
|
||||
if [ "${#CLIENTS_TO_CHANGE[@]}" -eq 0 ]; then
|
||||
echo -e "::\e[4m Client list \e[0m::"
|
||||
len=${#LIST[@]}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue