From e25cec4c0566c2ac1a1c36878bdbb33364b3519f Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sun, 27 Aug 2023 10:56:56 +0200 Subject: [PATCH] fix: [vps] support 'docker compose' naming convention for finding mysql container --- bin/vps | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/vps b/bin/vps index 9f10f74..b935033 100755 --- a/bin/vps +++ b/bin/vps @@ -272,7 +272,11 @@ mailcow:install-backup() { return 1 } - MYSQL_CONTAINER=${MYSQL_CONTAINER:-mailcowdockerized_mysql-mailcow_1} + if docker compose >/dev/null 2>&1; then + MYSQL_CONTAINER=${MYSQL_CONTAINER:-mailcowdockerized-mysql-mailcow-1} + else + MYSQL_CONTAINER=${MYSQL_CONTAINER:-mailcowdockerized_mysql-mailcow_1} + fi container_id=$(docker ps -f name="$MYSQL_CONTAINER" --format "{{.ID}}") if [ -z "$container_id" ]; then err "Couldn't find docker container named '$MYSQL_CONTAINER'."