Skip to content

Commit

Permalink
Check mailcow.conf exists before source it
Browse files Browse the repository at this point in the history
  • Loading branch information
h3ssan committed Aug 6, 2024
1 parent e398cb9 commit b033937
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 @@ -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"
Expand Down

0 comments on commit b033937

Please sign in to comment.