Added Colors, cause there fancy :) + Added in generate_config.sh
This commit is contained in:
		
							parent
							
								
									88fbec1e53
								
							
						
					
					
						commit
						e67ba60863
					
				| @ -109,9 +109,24 @@ echo "Press enter to confirm the detected value '[value]' where applicable or en | |||||||
| while [ -z "${MAILCOW_HOSTNAME}" ]; do | while [ -z "${MAILCOW_HOSTNAME}" ]; do | ||||||
|   read -p "Mail server hostname (FQDN) - this is not your mail domain, but your mail servers hostname: " -e MAILCOW_HOSTNAME |   read -p "Mail server hostname (FQDN) - this is not your mail domain, but your mail servers hostname: " -e MAILCOW_HOSTNAME | ||||||
|   DOTS=${MAILCOW_HOSTNAME//[^.]}; |   DOTS=${MAILCOW_HOSTNAME//[^.]}; | ||||||
|   if [ ${#DOTS} -lt 2 ] && [ ! -z ${MAILCOW_HOSTNAME} ]; then |   if [ ${#DOTS} -lt 1 ]; then | ||||||
|     echo "${MAILCOW_HOSTNAME} is not a FQDN" |     echo -e "\e[31mMAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is not a FQDN!\e[0m" | ||||||
|     MAILCOW_HOSTNAME= |     sleep 1 | ||||||
|  |     echo "Please change it to a FQDN and redeploy the stack with docker(-)compose up -d" | ||||||
|  |     exit 1 | ||||||
|  |   elif [[ "${MAILCOW_HOSTNAME: -1}" == "." ]]; then | ||||||
|  |     echo "MAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is ending with a dot. This is not a valid FQDN!" | ||||||
|  |     exit 1 | ||||||
|  |   elif [ ${#DOTS} -eq 1 ]; then | ||||||
|  |     echo -e "\e[33mMAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) does not contain a Subdomain. This is not fully tested and may cause issues.\e[0m" | ||||||
|  |     echo "Find more information about why this message exists here: https://github.com/mailcow/mailcow-dockerized/issues/1572" | ||||||
|  |     read -r -p "Do you want to proceed anyway? [y/N] " response | ||||||
|  |     if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then | ||||||
|  |       echo "OK. Procceding." | ||||||
|  |     else | ||||||
|  |       echo "OK. Exiting." | ||||||
|  |       exit 1 | ||||||
|  |     fi | ||||||
|   fi |   fi | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -419,14 +419,15 @@ detect_docker_compose_command | |||||||
| [[ ! -f mailcow.conf ]] && { echo "mailcow.conf is missing! Is mailcow installed?"; exit 1;} | [[ ! -f mailcow.conf ]] && { echo "mailcow.conf is missing! Is mailcow installed?"; exit 1;} | ||||||
| DOTS=${MAILCOW_HOSTNAME//[^.]}; | DOTS=${MAILCOW_HOSTNAME//[^.]}; | ||||||
| if [ ${#DOTS} -lt 1 ]; then | if [ ${#DOTS} -lt 1 ]; then | ||||||
|   echo "MAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is not a FQDN!" |   echo -e "\e[31mMAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is not a FQDN!\e[0m" | ||||||
|   echo "Please change it to a FQDN and run $COMPOSE_COMMAND down followed by $COMPOSE_COMMAND up -d" |   sleep 1 | ||||||
|  |   echo "Please change it to a FQDN and redeploy the stack with $COMPOSE_COMMAND up -d" | ||||||
|   exit 1 |   exit 1 | ||||||
| elif [[ "${MAILCOW_HOSTNAME: -1}" == "." ]]; then | elif [[ "${MAILCOW_HOSTNAME: -1}" == "." ]]; then | ||||||
|   echo "MAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is ending with a dot. This is not a valid FQDN!" |   echo "MAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is ending with a dot. This is not a valid FQDN!" | ||||||
|   exit 1 |   exit 1 | ||||||
| elif [ ${#DOTS} -eq 1 ]; then | elif [ ${#DOTS} -eq 1 ]; then | ||||||
|   echo "MAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) does not contain a Subdomain. This is not fully tested and may cause issues." |   echo -e "\e[33mMAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) does not contain a Subdomain. This is not fully tested and may cause issues.\e[0m" | ||||||
|   echo "Find more information about why this message exists here: https://github.com/mailcow/mailcow-dockerized/issues/1572" |   echo "Find more information about why this message exists here: https://github.com/mailcow/mailcow-dockerized/issues/1572" | ||||||
|   read -r -p "Do you want to proceed anyway? [y/N] " response |   read -r -p "Do you want to proceed anyway? [y/N] " response | ||||||
|   if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then |   if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 DerLinkman
						DerLinkman