diff --git a/wireguard-install.sh b/wireguard-install.sh index 6ce7c8b..45e8df4 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -35,7 +35,8 @@ function addClient() { done until [[ "$IPV4_EXISTS" == '0' ]]; do - read -rp "Client's WireGuard IPv4: " -e -i "${SERVER_WG_IPV4: : -1}${DOT_IP}" CLIENT_WG_IPV4 + read -rp "Client's WireGuard IPv4: ${SERVER_WG_IPV4: : -1}" -e -i "${DOT_IP}" DOT_IP + CLIENT_WG_IPV4="${SERVER_WG_IPV4: : -1}${DOT_IP}" IPV4_EXISTS=$(grep -c "$CLIENT_WG_IPV4" "/etc/wireguard/$SERVER_WG_NIC.conf") if [[ $IPV4_EXISTS == '1' ]]; then @@ -46,7 +47,8 @@ function addClient() { done until [[ "$IPV6_EXISTS" == '0' ]]; do - read -rp "Client's WireGuard IPv6: " -e -i "${SERVER_WG_IPV6: : -1}${DOT_IP}" CLIENT_WG_IPV6 + read -rp "Client's WireGuard IPv6: ${SERVER_WG_IPV6: : -1}" -e -i "${DOT_IP}" DOT_IP + CLIENT_WG_IPV6="${SERVER_WG_IPV6: : -1}${DOT_IP}" IPV6_EXISTS=$(grep -c "$CLIENT_WG_IPV6" "/etc/wireguard/$SERVER_WG_NIC.conf") if [[ $IPV6_EXISTS == '1' ]]; then