From 5d14baa43a433638dc9500866039eea1546ed926 Mon Sep 17 00:00:00 2001 From: DerLinkman Date: Tue, 7 Jun 2022 18:38:43 +0200 Subject: [PATCH] Fixed typo for previous commit --- generate_config.sh | 2 +- helper-scripts/_cold-standby.sh | 9 ++++++++- helper-scripts/backup_and_restore.sh | 2 +- update.sh | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/generate_config.sh b/generate_config.sh index 35601098..800f0b53 100755 --- a/generate_config.sh +++ b/generate_config.sh @@ -34,7 +34,7 @@ if docker compose >/dev/null 2>&1; then echo -e "\e[32mFound Compose v2!\e[0m" elif docker-compose version --short | grep -m1 "^2" > /dev/null 2>&1; then echo -e "\e[32mFound Compose v2!\e[0m" - COMPOSE_COMMAND="docker compose" + COMPOSE_COMMAND="docker-compose" elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1; then echo -e "\e[33mWARN: Your machine is using Docker-Compose v1!\e[0m" echo -e "\e[33mmailcow will drop the Docker-Compose v1 Support in December 2022\e[0m" diff --git a/helper-scripts/_cold-standby.sh b/helper-scripts/_cold-standby.sh index 534add48..14200954 100755 --- a/helper-scripts/_cold-standby.sh +++ b/helper-scripts/_cold-standby.sh @@ -90,7 +90,7 @@ function preflight_local_checks() { echo -e "\e[32mFound Compose v2 on local machine!\e[0m" elif docker-compose version --short | grep -m1 "^2" > /dev/null 2>&1; then echo -e "\e[32mFound Compose v2!\e[0m" - COMPOSE_COMMAND="docker compose" + COMPOSE_COMMAND="docker-compose" elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1; then echo -e "\e[33mWARN: Your machine is using Docker-Compose v1!\e[0m" echo -e "\e[33mmailcow will drop the Docker-Compose v1 Support in December 2022\e[0m" @@ -150,6 +150,13 @@ function preflight_remote_checks() { -t 'docker compose' >/dev/null 2>&1; then echo -e "\e[32mFound Compose v2 on remote!\e[0m" COMPOSE_COMMAND="docker compose" + elif ssh -q -o StrictHostKeyChecking=no \ + -i "${REMOTE_SSH_KEY}" \ + ${REMOTE_SSH_HOST} \ + -p ${REMOTE_SSH_PORT} \ + -t 'docker-compose version --short' | grep -m1 "^2" > /dev/null 2>&1; then + echo -e "\e[32mFound Compose v2!\e[0m" + COMPOSE_COMMAND="docker-compose" elif ssh -q -o StrictHostKeyChecking=no \ -i "${REMOTE_SSH_KEY}" \ ${REMOTE_SSH_HOST} \ diff --git a/helper-scripts/backup_and_restore.sh b/helper-scripts/backup_and_restore.sh index 15407aae..8136def3 100755 --- a/helper-scripts/backup_and_restore.sh +++ b/helper-scripts/backup_and_restore.sh @@ -82,7 +82,7 @@ if docker compose >/dev/null 2>&1; then COMPOSE_COMMAND="docker compose" elif docker-compose version --short | grep -m1 "^2" > /dev/null 2>&1; then echo -e "\e[32mFound Compose v2!\e[0m" - COMPOSE_COMMAND="docker compose" + COMPOSE_COMMAND="docker-compose" elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1; then echo -e "\e[33mWARN: Your machine is using Docker-Compose v1!\e[0m" echo -e "\e[33mmailcow will drop the Docker-Compose v1 Support in December 2022\e[0m" diff --git a/update.sh b/update.sh index 16e6f9a9..0b9e12d2 100755 --- a/update.sh +++ b/update.sh @@ -51,7 +51,7 @@ if docker compose >/dev/null 2>&1; then COMPOSE_COMMAND="docker compose" elif docker-compose version --short | grep -m1 "^2" > /dev/null 2>&1; then echo -e "\e[32mFound Compose v2!\e[0m" - COMPOSE_COMMAND="docker compose" + COMPOSE_COMMAND="docker-compose" elif docker-compose version --short | grep -m1 "^1" > /dev/null 2>&1; then echo -e "\e[33mWARN: Your machine is using Docker-Compose v1!\e[0m" echo -e "\e[33mmailcow will drop the Docker-Compose v1 Support in December 2022\e[0m"