added check for at least one serverName
This commit is contained in:
		
							parent
							
								
									d440addca3
								
							
						
					
					
						commit
						619c069c06
					
				
							
								
								
									
										2
									
								
								.vscode/numbered-bookmarks.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.vscode/numbered-bookmarks.json
									
									
									
									
										vendored
									
									
								
							| @ -12,7 +12,7 @@ | |||||||
| 				-1, | 				-1, | ||||||
| 				-1, | 				-1, | ||||||
| 				-1, | 				-1, | ||||||
| 				110 | 				115 | ||||||
| 			] | 			] | ||||||
| 		} | 		} | ||||||
| 	] | 	] | ||||||
|  | |||||||
							
								
								
									
										5
									
								
								setup.sh
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								setup.sh
									
									
									
									
									
								
							| @ -92,7 +92,12 @@ while true; do | |||||||
|     read -p "What hostnames should this server answer to? " inputServerName |     read -p "What hostnames should this server answer to? " inputServerName | ||||||
|     case "${inputServerName}" in |     case "${inputServerName}" in | ||||||
|         '') |         '') | ||||||
|  |             # 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 |                 break | ||||||
|  |             fi | ||||||
|             ;; |             ;; | ||||||
|         [Xx]*) |         [Xx]*) | ||||||
|             echo -e "\n${cyan}---exiting---\n${norm}" |             echo -e "\n${cyan}---exiting---\n${norm}" | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user