Skip to content

Commit

Permalink
Merge pull request #5987 from h3ssan/fix/validate-mailcow-conf-before…
Browse files Browse the repository at this point in the history
…-source

Bug Fix: Check `mailcow.conf` exists before work with it
  • Loading branch information
DerLinkman authored Aug 7, 2024
2 parents a001a05 + cc0dc2e commit bf050f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,13 @@ while (($#)); do
shift
done

[[ ! -f mailcow.conf ]] && { echo -e "\e[31mmailcow.conf is missing! Is mailcow installed?\e[0m"; 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"
Expand Down

0 comments on commit bf050f1

Please sign in to comment.