From 62c3fc075b34baa0929463acae54ff956414d30a Mon Sep 17 00:00:00 2001 From: Roy Lenferink Date: Mon, 9 Jan 2023 16:26:04 +0100 Subject: [PATCH] Update reset-admin script for usage with Docker and Podman --- helper-scripts/mailcow-reset-admin.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/helper-scripts/mailcow-reset-admin.sh b/helper-scripts/mailcow-reset-admin.sh index ee95d3e9..0b0186ec 100755 --- a/helper-scripts/mailcow-reset-admin.sh +++ b/helper-scripts/mailcow-reset-admin.sh @@ -7,8 +7,10 @@ if [[ -z ${DBUSER} ]] || [[ -z ${DBPASS} ]] || [[ -z ${DBNAME} ]]; then exit 1 fi +_engine="${MAILCOW_CONTAINER_ENGINE}" + echo -n "Checking MySQL service... " -if [[ -z $(docker ps -qf name=mysql-mailcow) ]]; then +if [[ -z $(${_engine} ps -qf name=mysql-mailcow) ]]; then echo "failed" echo "MySQL (mysql-mailcow) is not up and running, exiting..." exit 1 @@ -20,11 +22,11 @@ response=${response,,} # tolower if [[ "$response" =~ ^(yes|y)$ ]]; then echo -e "\nWorking, please wait..." random=$(