Merge pull request #4691 from mailcow/staging
Merge staging into master
This commit is contained in:
commit
b6e3e7a658
@ -2,6 +2,7 @@
|
||||
|
||||
## We stand with 🇺🇦
|
||||
|
||||
[![Mailcow Integration Tests](https://github.com/mailcow/mailcow-dockerized/actions/workflows/integration_tests.yml/badge.svg?branch=master)](https://github.com/mailcow/mailcow-dockerized/actions/workflows/integration_tests.yml)
|
||||
[![Translation status](https://translate.mailcow.email/widgets/mailcow-dockerized/-/translation/svg-badge.svg)](https://translate.mailcow.email/engage/mailcow-dockerized/)
|
||||
[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/mailcow_email.svg?style=social&label=Follow%20%40mailcow_email)](https://twitter.com/mailcow_email)
|
||||
|
||||
|
42
update.sh
42
update.sh
@ -203,7 +203,7 @@ else
|
||||
DC_DL_SUFFIX=legacy
|
||||
fi
|
||||
sleep 1
|
||||
if [[ $(which pip 2>&1) && $(pip list --local 2>&1 | grep -v DEPRECATION | grep -c docker-compose) == 1 || $(which pip3 2>&1) && $(pip3 list --local 2>&1 | grep -v DEPRECATION | grep -c docker-compose) == 1 ]]; then
|
||||
if [[ $(command -v pip 2>&1) && $(pip list --local 2>&1 | grep -v DEPRECATION | grep -c docker-compose) == 1 || $(command -v pip3 2>&1) && $(pip3 list --local 2>&1 | grep -v DEPRECATION | grep -c docker-compose) == 1 ]]; then
|
||||
echo -e "\e[33mFound a docker-compose Version installed with pip!\e[0m"
|
||||
echo -e "\e[31mPlease uninstall the pip Version of docker-compose since it doesn´t support Versions higher than 1.29.2.\e[0m"
|
||||
sleep 2
|
||||
@ -214,7 +214,7 @@ else
|
||||
LATEST_COMPOSE=$(curl -#L https://www.servercow.de/docker-compose/latest.php)
|
||||
COMPOSE_VERSION=$(docker-compose version --short)
|
||||
if [[ "$LATEST_COMPOSE" != "$COMPOSE_VERSION" ]]; then
|
||||
COMPOSE_PATH=$(which docker-compose)
|
||||
COMPOSE_PATH=$(command -v docker-compose)
|
||||
if [[ -w ${COMPOSE_PATH} ]]; then
|
||||
curl -#L https://github.com/docker/compose/releases/download/v${LATEST_COMPOSE}/docker-compose-$(uname -s)-$(uname -m) > $COMPOSE_PATH
|
||||
chmod +x $COMPOSE_PATH
|
||||
@ -273,30 +273,17 @@ PATH=$PATH:/opt/bin
|
||||
umask 0022
|
||||
|
||||
for bin in curl docker git awk sha1sum; do
|
||||
if [[ -z $(which ${bin}) ]]; then
|
||||
if [[ -z $(command -v ${bin}) ]]; then
|
||||
echo "Cannot find ${bin}, exiting..."
|
||||
exit 1;
|
||||
elif [[ -z $(which docker-compose) ]]; then
|
||||
echo -e "\e[31mCannot find docker-compose Standalone.\e[0m"
|
||||
echo -e "\e[31mPlease install it manually regarding to this doc site: https://mailcow.github.io/mailcow-dockerized-docs/i_u_m/i_u_m_install/\e[0m"
|
||||
sleep 3
|
||||
exit 1;
|
||||
fi
|
||||
done
|
||||
|
||||
## Check if docker-compose >= v2
|
||||
if ! docker-compose version --short | grep "^2." > /dev/null 2>&1; then
|
||||
echo -e "\e[33mYour docker-compose Version is not up to date!\e[0m"
|
||||
echo -e "\e[33mmailcow needs docker-compose > 2.X.X!\e[0m"
|
||||
echo -e "\e[33mYour current installed Version: $(docker-compose version --short)\e[0m"
|
||||
if [[ -z $(command -v docker-compose) ]]; then
|
||||
echo -e "\e[31mCannot find docker-compose Standalone.\e[0m"
|
||||
echo -e "\e[31mPlease install it manually regarding to this doc site: https://mailcow.github.io/mailcow-dockerized-docs/i_u_m/i_u_m_install/\e[0m"
|
||||
sleep 3
|
||||
update_compose
|
||||
if [[ ! "${updatecomposeresponse}" =~ ^([yY][eE][sS]|[yY])+$ ]]; then
|
||||
echo -e "\e[31mmailcow does not work with docker-compose < 2.X.X anymore!\e[0m"
|
||||
echo -e "\e[31mPlease update your docker-compose manually, to run mailcow.\e[0m"
|
||||
echo -e "\e[31mExiting...\e[0m"
|
||||
exit 1
|
||||
fi
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
export LC_ALL=C
|
||||
@ -378,6 +365,21 @@ while (($#)); do
|
||||
shift
|
||||
done
|
||||
|
||||
# Check if Docker-Compose is older then v2 before continuing
|
||||
if ! docker-compose version --short | grep "^2." > /dev/null 2>&1; then
|
||||
echo -e "\e[33mYour docker-compose Version is not up to date!\e[0m"
|
||||
echo -e "\e[33mmailcow needs docker-compose > 2.X.X!\e[0m"
|
||||
echo -e "\e[33mYour current installed Version: $(docker-compose version --short)\e[0m"
|
||||
sleep 3
|
||||
update_compose
|
||||
if [[ ! "${updatecomposeresponse}" =~ ^([yY][eE][sS]|[yY])+$ ]] && [[ ! ${FORCE} ]]; then
|
||||
echo -e "\e[31mmailcow does not work with docker-compose < 2.X.X anymore!\e[0m"
|
||||
echo -e "\e[31mPlease update your docker-compose manually, to run mailcow.\e[0m"
|
||||
echo -e "\e[31mExiting...\e[0m"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ ! -f mailcow.conf ]] && { echo "mailcow.conf is missing"; exit 1;}
|
||||
chmod 600 mailcow.conf
|
||||
source mailcow.conf
|
||||
|
Loading…
Reference in New Issue
Block a user