Browse Source

Fix bug in installer (#3133)

Jaap Marcus 3 years ago
parent
commit
eea9680d14
2 changed files with 2 additions and 2 deletions
  1. 1 1
      install/hst-install-debian.sh
  2. 1 1
      install/hst-install-ubuntu.sh

+ 1 - 1
install/hst-install-debian.sh

@@ -172,7 +172,7 @@ sort_config_file() {
 validate_hostname() {
 	# remove extra .
 	servername=$(echo "$servername" | sed -e "s/[.]*$//g")
-	servername=$(echo "$domain" | sed -e "s/^[.]*//")
+	servername=$(echo "$servername" | sed -e "s/^[.]*//")
 	if [[ $(echo "$servername" | grep -o "\." | wc -l) -gt 1 ]] && [[ ! $servername =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
 		# Hostname valid
 		return 1

+ 1 - 1
install/hst-install-ubuntu.sh

@@ -171,7 +171,7 @@ sort_config_file() {
 validate_hostname() {
 	# remove extra .
 	servername=$(echo "$servername" | sed -e "s/[.]*$//g")
-	servername=$(echo "$domain" | sed -e "s/^[.]*//")
+	servername=$(echo "$servername" | sed -e "s/^[.]*//")
 	if [[ $(echo "$servername" | grep -o "\." | wc -l) -gt 1 ]] && [[ ! $servername =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
 		# Hostname valid
 		return 1