From c0131f2a173365eea79e8a222fde9c4470f7766c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dundar=20G=C3=B6c?= Date: Sun, 14 Feb 2021 14:05:30 +0100 Subject: [PATCH] Fixed shellcheck warning SC2034 SC2034: ___ appears unused. Verify use (or export if used externally). I opted to remove the variables since they didn't seem to be used anywhere. --- auto_install/install.sh | 1 - scripts/wireguard/bash-completion | 3 +-- scripts/wireguard/clientSTAT.sh | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index 71c4dc8..413a3cd 100755 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -29,7 +29,6 @@ debianOvpnUserGroup="openvpn:openvpn" ######## PKG Vars ######## PKG_MANAGER="apt-get" -PKG_CACHE="/var/lib/apt/lists/" ### FIXME: quoting UPDATE_PKG_CACHE and PKG_INSTALL hangs the script, shellcheck SC2086 UPDATE_PKG_CACHE="${PKG_MANAGER} update -y" PKG_INSTALL="${PKG_MANAGER} --yes --no-install-recommends install" diff --git a/scripts/wireguard/bash-completion b/scripts/wireguard/bash-completion index ae57b41..84713d7 100644 --- a/scripts/wireguard/bash-completion +++ b/scripts/wireguard/bash-completion @@ -1,9 +1,8 @@ _pivpn() { - local cur prev opts + local cur opts COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" dashopts="-a -c -d -l -qr -r -h -u -up -bk -off -on" opts="add clients debug list qrcode remove help uninstall update backup (temp) off (temp) on" if [ "${#COMP_WORDS[@]}" -eq 2 ] diff --git a/scripts/wireguard/clientSTAT.sh b/scripts/wireguard/clientSTAT.sh index f47e800..139b09d 100755 --- a/scripts/wireguard/clientSTAT.sh +++ b/scripts/wireguard/clientSTAT.sh @@ -2,7 +2,6 @@ # PiVPN: client status script CLIENTS_FILE="/etc/wireguard/configs/clients.txt" -CONF_FILE="/etc/wireguard/wg0.conf" if [ ! -s "$CLIENTS_FILE" ]; then echo "::: There are no clients to list"