Browse Source

Check `mailcow.conf` exists before source it

Hassan A Hashim 1 year ago
parent
commit
b0339372b5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      update.sh

+ 2 - 1
update.sh

@@ -404,12 +404,13 @@ while (($#)); do
   shift
 done
 
+[[ ! -f mailcow.conf ]] && { echo "mailcow.conf is missing! Is mailcow installed?"; exit 1;}
+
 chmod 600 mailcow.conf
 source mailcow.conf
 
 detect_docker_compose_command
 
-[[ ! -f mailcow.conf ]] && { echo "mailcow.conf is missing! Is mailcow installed?"; exit 1;}
 DOTS=${MAILCOW_HOSTNAME//[^.]};
 if [ ${#DOTS} -lt 1 ]; then
   echo -e "\e[31mMAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is not a FQDN!\e[0m"