mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-25 02:29:32 +02:00
[Compose] move then in if statement
This commit is contained in:
parent
7bcc8bd3a2
commit
08d0f9448e
@ -30,11 +30,9 @@ for bin in openssl curl docker git awk sha1sum; do
|
||||
done
|
||||
|
||||
echo "checking docker compose version...";
|
||||
if docker --help | grep compose
|
||||
then
|
||||
if docker --help | grep compose then
|
||||
echo ''
|
||||
elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1
|
||||
then
|
||||
elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1 then
|
||||
>&2 echo -e "\e[31mWARN: Your machine is using Docker-Compose v1!\e[0m"
|
||||
>&2 echo -e "\e[31mmailcow will drop the Docker-Compose v1 Support in December 2022\e[0m"
|
||||
>&2 echo -e "\e[31mPlease consider a upgrade to Docker-Compose v2.\e[0m"
|
||||
@ -42,7 +40,6 @@ then
|
||||
>&2 echo
|
||||
>&2 echo -e "\e[33mContinuing...\e[0m"
|
||||
sleep 3
|
||||
|
||||
else
|
||||
>&2 echo -e "\e[31mCannot find Docker-Compose v1 or v2 on your System. Please install Docker-Compose v2 and re-run the Script.\e[0m"
|
||||
exit 1
|
||||
|
@ -86,11 +86,9 @@ function preflight_local_checks() {
|
||||
|
||||
|
||||
echo "checking docker compose version...";
|
||||
if docker --help | grep compose
|
||||
then
|
||||
if docker --help | grep compose then
|
||||
echo ''
|
||||
elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1
|
||||
then
|
||||
elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1 then
|
||||
>&2 echo -e "\e[31mWARN: Your machine is using Docker-Compose v1!\e[0m"
|
||||
>&2 echo -e "\e[31mmailcow will drop the Docker-Compose v1 Support in December 2022\e[0m"
|
||||
>&2 echo -e "\e[31mPlease consider a upgrade to Docker-Compose v2.\e[0m"
|
||||
@ -98,7 +96,6 @@ function preflight_local_checks() {
|
||||
>&2 echo
|
||||
>&2 echo -e "\e[33mContinuing...\e[0m"
|
||||
sleep 3
|
||||
|
||||
else
|
||||
>&2 echo -e "\e[31mCannot find Docker-Compose v1 or v2 on your System. Please install Docker-Compose v2 and re-run the Script.\e[0m"
|
||||
exit 1
|
||||
@ -147,15 +144,13 @@ function preflight_remote_checks() {
|
||||
-i "${REMOTE_SSH_KEY}" \
|
||||
${REMOTE_SSH_HOST} \
|
||||
-p ${REMOTE_SSH_PORT} \
|
||||
-t docker --help | grep compose
|
||||
then
|
||||
-t docker --help | grep compose then
|
||||
COMPOSE_COMMAND="docker compose"
|
||||
elif ssh -q -o StrictHostKeyChecking=no \
|
||||
-i "${REMOTE_SSH_KEY}" \
|
||||
${REMOTE_SSH_HOST} \
|
||||
-p ${REMOTE_SSH_PORT} \
|
||||
'docker-compose version --short' | grep -m1 "^1" > /dev/null 2>&1
|
||||
then
|
||||
'docker-compose version --short' | grep -m1 "^1" > /dev/null 2>&1 then
|
||||
>&2 echo -e "\e[31mWARN: The remote is using Docker-Compose v1!\e[0m"
|
||||
>&2 echo -e "\e[31mmailcow will drop the Docker-Compose v1 Support in December 2022\e[0m"
|
||||
>&2 echo -e "\e[31mPlease consider a upgrade to Docker-Compose v2 on remote.\e[0m"
|
||||
|
@ -77,11 +77,9 @@ else
|
||||
fi
|
||||
|
||||
echo "checking docker compose version...";
|
||||
if docker --help | grep compose
|
||||
then
|
||||
if docker --help | grep compose then
|
||||
COMPOSE_COMMAND="docker compose"
|
||||
elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1
|
||||
then
|
||||
elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1 then
|
||||
>&2 echo -e "\e[31mWARN: Your machine is using Docker-Compose v1!\e[0m"
|
||||
>&2 echo -e "\e[31mmailcow will drop the Docker-Compose v1 Support in December 2022\e[0m"
|
||||
>&2 echo -e "\e[31mPlease consider a upgrade to Docker-Compose v2.\e[0m"
|
||||
|
@ -46,12 +46,9 @@ done
|
||||
|
||||
|
||||
echo "checking docker compose version...";
|
||||
if docker --help | grep compose
|
||||
then
|
||||
if docker --help | grep compose then
|
||||
COMPOSE_COMMAND="docker compose"
|
||||
|
||||
elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1
|
||||
then
|
||||
elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1 then
|
||||
>&2 echo -e "\e[31mWARN: Your machine is using Docker-Compose v1!\e[0m"
|
||||
>&2 echo -e "\e[31mmailcow will drop the Docker-Compose v1 Support in December 2022\e[0m"
|
||||
>&2 echo -e "\e[31mPlease consider a upgrade to Docker-Compose v2.\e[0m"
|
||||
@ -60,7 +57,6 @@ then
|
||||
>&2 echo -e "\e[33mContinuing...\e[0m"
|
||||
sleep 3
|
||||
COMPOSE_COMMAND="docker-compose"
|
||||
|
||||
else
|
||||
>&2 echo -e "\e[31mCannot find Docker-Compose v1 or v2 on your System. Please install Docker-Compose v2 and re-run the Script.\e[0m"
|
||||
exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user