mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-25 02:29:32 +02:00
[Compose] Remove >&2 in if block
This commit is contained in:
parent
08d0f9448e
commit
958112af6b
@ -30,18 +30,18 @@ for bin in openssl curl docker git awk sha1sum; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo "checking docker compose version...";
|
echo "checking docker compose version...";
|
||||||
if docker --help | grep compose then
|
if docker --help | grep compose; then
|
||||||
echo ''
|
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"
|
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"
|
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"
|
echo -e "\e[31mPlease consider a upgrade to Docker-Compose v2.\e[0m"
|
||||||
>&2 echo
|
echo
|
||||||
>&2 echo
|
echo
|
||||||
>&2 echo -e "\e[33mContinuing...\e[0m"
|
echo -e "\e[33mContinuing...\e[0m"
|
||||||
sleep 3
|
sleep 3
|
||||||
else
|
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"
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -86,23 +86,23 @@ function preflight_local_checks() {
|
|||||||
|
|
||||||
|
|
||||||
echo "checking docker compose version...";
|
echo "checking docker compose version...";
|
||||||
if docker --help | grep compose then
|
if docker --help | grep compose; then
|
||||||
echo ''
|
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"
|
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"
|
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"
|
echo -e "\e[31mPlease consider a upgrade to Docker-Compose v2.\e[0m"
|
||||||
>&2 echo
|
echo
|
||||||
>&2 echo
|
echo
|
||||||
>&2 echo -e "\e[33mContinuing...\e[0m"
|
echo -e "\e[33mContinuing...\e[0m"
|
||||||
sleep 3
|
sleep 3
|
||||||
else
|
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"
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep --help 2>&1 | head -n 1 | grep -q -i "busybox"; then
|
if grep --help 2>&1 | head -n 1 | grep -q -i "busybox"; then
|
||||||
>&2 echo -e "\e[31mBusyBox grep detected on local system, please install GNU grep\e[0m"
|
echo -e "\e[31mBusyBox grep detected on local system, please install GNU grep\e[0m"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -144,23 +144,23 @@ function preflight_remote_checks() {
|
|||||||
-i "${REMOTE_SSH_KEY}" \
|
-i "${REMOTE_SSH_KEY}" \
|
||||||
${REMOTE_SSH_HOST} \
|
${REMOTE_SSH_HOST} \
|
||||||
-p ${REMOTE_SSH_PORT} \
|
-p ${REMOTE_SSH_PORT} \
|
||||||
-t docker --help | grep compose then
|
-t docker --help | grep compose; then
|
||||||
COMPOSE_COMMAND="docker compose"
|
COMPOSE_COMMAND="docker compose"
|
||||||
elif ssh -q -o StrictHostKeyChecking=no \
|
elif ssh -q -o StrictHostKeyChecking=no \
|
||||||
-i "${REMOTE_SSH_KEY}" \
|
-i "${REMOTE_SSH_KEY}" \
|
||||||
${REMOTE_SSH_HOST} \
|
${REMOTE_SSH_HOST} \
|
||||||
-p ${REMOTE_SSH_PORT} \
|
-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"
|
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"
|
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"
|
echo -e "\e[31mPlease consider a upgrade to Docker-Compose v2 on remote.\e[0m"
|
||||||
>&2 echo
|
echo
|
||||||
>&2 echo
|
echo
|
||||||
>&2 echo -e "\e[33mContinuing...\e[0m"
|
echo -e "\e[33mContinuing...\e[0m"
|
||||||
sleep 3
|
sleep 3
|
||||||
COMPOSE_COMMAND="docker-compose"
|
COMPOSE_COMMAND="docker-compose"
|
||||||
else
|
else
|
||||||
>&2 echo -e "\e[31mCannot find Docker-Compose v1 or v2 on the Remote Machine! Please install Docker-Compose v2 on that and re-run the script.\e[0m"
|
echo -e "\e[31mCannot find Docker-Compose v1 or v2 on the Remote Machine! Please install Docker-Compose v2 on that and re-run the script.\e[0m"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -77,19 +77,19 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "checking docker compose version...";
|
echo "checking docker compose version...";
|
||||||
if docker --help | grep compose then
|
if docker --help | grep compose; then
|
||||||
COMPOSE_COMMAND="docker compose"
|
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"
|
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"
|
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"
|
echo -e "\e[31mPlease consider a upgrade to Docker-Compose v2.\e[0m"
|
||||||
>&2 echo
|
echo
|
||||||
>&2 echo
|
echo
|
||||||
>&2 echo -e "\e[33mContinuing...\e[0m"
|
echo -e "\e[33mContinuing...\e[0m"
|
||||||
sleep 3
|
sleep 3
|
||||||
COMPOSE_COMMAND="docker-compose"
|
COMPOSE_COMMAND="docker-compose"
|
||||||
else
|
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"
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
18
update.sh
18
update.sh
@ -46,19 +46,19 @@ done
|
|||||||
|
|
||||||
|
|
||||||
echo "checking docker compose version...";
|
echo "checking docker compose version...";
|
||||||
if docker --help | grep compose then
|
if docker --help | grep compose; then
|
||||||
COMPOSE_COMMAND="docker compose"
|
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"
|
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"
|
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"
|
echo -e "\e[31mPlease consider a upgrade to Docker-Compose v2.\e[0m"
|
||||||
>&2 echo
|
echo
|
||||||
>&2 echo
|
echo
|
||||||
>&2 echo -e "\e[33mContinuing...\e[0m"
|
echo -e "\e[33mContinuing...\e[0m"
|
||||||
sleep 3
|
sleep 3
|
||||||
COMPOSE_COMMAND="docker-compose"
|
COMPOSE_COMMAND="docker-compose"
|
||||||
else
|
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"
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
Loading…
Reference in New Issue
Block a user