added check for at least one serverName

This commit is contained in:
Asif Bacchus 2019-01-05 02:16:05 -07:00
parent d440addca3
commit 619c069c06
2 changed files with 7 additions and 2 deletions

View File

@ -12,7 +12,7 @@
-1,
-1,
-1,
110
115
]
}
]

View File

@ -92,7 +92,12 @@ while true; do
read -p "What hostnames should this server answer to? " inputServerName
case "${inputServerName}" in
'')
break
# check that at least one name as been provided
if [ -z "${serverNames_working}" ]; then
echo -e "\n${err}You must provide at least one hostname${norm}"
else
break
fi
;;
[Xx]*)
echo -e "\n${cyan}---exiting---\n${norm}"