From e19cd327c936ae65743d01604ce148259d2d2122 Mon Sep 17 00:00:00 2001 From: DjZU Date: Sun, 23 Jul 2023 19:44:01 +0200 Subject: [PATCH] Fix tabulation for listClients() and revokeClient() --- wireguard-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wireguard-install.sh b/wireguard-install.sh index 2f95ecb..0269036 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -391,7 +391,7 @@ function listClients() { exit 1 fi - grep -E "^### Client" "/etc/wireguard/${SERVER_WG_NIC}.conf" | cut -d ' ' -f 3 | nl -s ') ' + grep -E "^### Client" "/etc/wireguard/${SERVER_WG_NIC}.conf" | cut -d ' ' -f 3 | nl -w4 -s ') ' } function revokeClient() { @@ -404,7 +404,7 @@ function revokeClient() { echo "" echo "Select the existing client you want to revoke" - grep -E "^### Client" "/etc/wireguard/${SERVER_WG_NIC}.conf" | cut -d ' ' -f 3 | nl -s ') ' + grep -E "^### Client" "/etc/wireguard/${SERVER_WG_NIC}.conf" | cut -d ' ' -f 3 | nl -w4 -s ') ' until [[ ${CLIENT_NUMBER} -ge 1 && ${CLIENT_NUMBER} -le ${NUMBER_OF_CLIENTS} ]]; do if [[ ${CLIENT_NUMBER} == '1' ]]; then read -rp "Select one client [1]: " CLIENT_NUMBER