From 12c3e8777ca15cc273c05ae3efc875faf62742d0 Mon Sep 17 00:00:00 2001 From: Ze'ev Schurmann Date: Fri, 2 Aug 2024 02:09:56 +0200 Subject: [PATCH] v0.2.1 Minor change in validate_hostname function --- achar | 2 +- src/achar.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/achar b/achar index a3d142d..b2609fd 100644 --- a/achar +++ b/achar @@ -1,6 +1,6 @@ #!/bin/bash ## Title : ACHAR - Auto Completion of Hosts Add/Remove script -## Version : 0.2 +## Version : 0.2.1 ## GIT Repo : https://git.zaks.web.za/zaks-web/achar ## Author : Ze'ev Schurmann ## Company : ZAKS Web diff --git a/src/achar.sh b/src/achar.sh index a3d142d..ef8d3a3 100644 --- a/src/achar.sh +++ b/src/achar.sh @@ -1,6 +1,6 @@ #!/bin/bash ## Title : ACHAR - Auto Completion of Hosts Add/Remove script -## Version : 0.2 +## Version : 0.2.1 ## GIT Repo : https://git.zaks.web.za/zaks-web/achar ## Author : Ze'ev Schurmann ## Company : ZAKS Web @@ -525,7 +525,7 @@ function validate_host { else - echo "Hostname is not an valid!" + echo "Invalid Domain Name or IP address!" exit 1 fi @@ -533,6 +533,7 @@ function validate_host { if [[ ${username:0:1} =~ ^[0-9]$ ]] || [[ ! $username =~ ^[A-Za-z0-9_.-]+$ ]]; then echo "Username is not a valid format!" + echo "Must contain \"A-Z\", \"a-z\", \"0-9\", \"_\", \".\" and \"-\"." exit 1 fi