Re-arranged position of source mailcow.conf

This commit is contained in:
DerLinkman 2022-08-25 10:32:33 +02:00
parent 1f9f4157a6
commit bc9141753f

View File

@ -344,11 +344,12 @@ while (($#)); do
shift shift
done done
chmod 600 mailcow.conf
source mailcow.conf
detect_docker_compose_command 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;}
chmod 600 mailcow.conf
source mailcow.conf
DOTS=${MAILCOW_HOSTNAME//[^.]}; DOTS=${MAILCOW_HOSTNAME//[^.]};
if [ ${#DOTS} -lt 2 ]; then if [ ${#DOTS} -lt 2 ]; then
echo "MAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is not a FQDN!" echo "MAILCOW_HOSTNAME (${MAILCOW_HOSTNAME}) is not a FQDN!"
@ -734,16 +735,16 @@ elif [ $NEW_BRANCH == "nightly" ] && [ $CURRENT_BRANCH != "nightly" ]; then
git checkout -f ${BRANCH} git checkout -f ${BRANCH}
fi fi
echo -e "\e[32mChecking for newer update script...\e[0m" # echo -e "\e[32mChecking for newer update script...\e[0m"
SHA1_1=$(sha1sum update.sh) # SHA1_1=$(sha1sum update.sh)
git fetch origin #${BRANCH} # git fetch origin #${BRANCH}
git checkout origin/${BRANCH} update.sh # git checkout origin/${BRANCH} update.sh
SHA1_2=$(sha1sum update.sh) # SHA1_2=$(sha1sum update.sh)
if [[ ${SHA1_1} != ${SHA1_2} ]]; then # if [[ ${SHA1_1} != ${SHA1_2} ]]; then
echo "update.sh changed, please run this script again, exiting." # echo "update.sh changed, please run this script again, exiting."
chmod +x update.sh # chmod +x update.sh
exit 2 # exit 2
fi # fi
if [ ! $FORCE ]; then if [ ! $FORCE ]; then
read -r -p "Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N] " response read -r -p "Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N] " response