This commit is contained in:
Stanislas Lange 2023-01-22 10:20:56 +01:00
parent a2953ec795
commit 51479f75b3
No known key found for this signature in database
2 changed files with 4 additions and 5 deletions

View File

@ -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
```

View File

@ -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)