diff --git a/README.md b/README.md index 6f06db3..edd68e0 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Supported distributions: Download and execute the script. Answer the questions asked by the script and it will take care of the rest. ```bash -curl -O https://raw.githubusercontent.com/elieobeid7/wireguard-install/master/wireguard-install.sh +curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh chmod +x wireguard-install.sh ./wireguard-install.sh ``` diff --git a/wireguard-install.sh b/wireguard-install.sh index 41c3156..65f1311 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -330,14 +330,13 @@ AllowedIPs = ${CLIENT_WG_IPV4}/32,${CLIENT_WG_IPV6}/128" >>"/etc/wireguard/${SER function listClients() { NUMBER_OF_CLIENTS=$(grep -c -E "^### Client" "/etc/wireguard/${SERVER_WG_NIC}.conf") - if [[ ${NUMBER_OF_CLIENTS} == '0' ]]; then + if [[ ${NUMBER_OF_CLIENTS} -eq 0 ]]; then echo "" echo "You have no existing clients!" exit 1 fi grep -E "^### Client" "/etc/wireguard/${SERVER_WG_NIC}.conf" | cut -d ' ' -f 3 | nl -s ') ' - } function revokeClient() { @@ -433,7 +432,7 @@ function manageMenu() { echo "" echo "What do you want to do?" echo " 1) Add a new user" - echo " 2) List all users" + echo " 2) List all users" echo " 3) Revoke existing user" echo " 4) Uninstall WireGuard" echo " 5) Exit" @@ -444,7 +443,7 @@ function manageMenu() { 1) newClient ;; - 2) + 2) listClients ;; 3)