aboutsummaryrefslogtreecommitdiff
path: root/wireguard-install.sh
diff options
context:
space:
mode:
authorAleksander <zaruczewski@gmail.com>2020-08-05 21:16:03 +0300
committerGitHub <noreply@github.com>2020-08-05 21:16:03 +0300
commit2125b67cd787c55f159779829e53f112ac80825f (patch)
tree96fddaf5f89f8f02f2f10017c25d454b497a39c9 /wireguard-install.sh
parent2669e5af0cf25f7babf7320581874e1f93c35547 (diff)
Updated client name input restrictions and hint
Diffstat (limited to 'wireguard-install.sh')
-rw-r--r--wireguard-install.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/wireguard-install.sh b/wireguard-install.sh
index 59f7946..d450d99 100644
--- a/wireguard-install.sh
+++ b/wireguard-install.sh
@@ -212,9 +212,9 @@ function newClient() {
echo ""
echo "Tell me a name for the client."
- echo "Use one word only, no special characters."
+ echo "The name must consist of alphanumeric character. It may also include an underscore or a dash."
- until [[ ${CLIENT_NAME} =~ ^[a-zA-Z0-9_]+$ && ${CLIENT_EXISTS} == '0' ]]; do
+ until [[ ${CLIENT_NAME} =~ ^[a-zA-Z0-9_-]+$ && ${CLIENT_EXISTS} == '0' ]]; do
read -rp "Client name: " -e CLIENT_NAME
CLIENT_EXISTS=$(grep -c -E "^### Client ${CLIENT_NAME}\$" "/etc/wireguard/${SERVER_WG_NIC}.conf")