From 4b9ba22a0e7a1bbe6d05624a9e930cff91168e10 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 5 Mar 2023 18:38:30 +0100 Subject: [PATCH] install_roundcube.sh: change setting of 'DEFAULT_MYSQL_CREDENTIALS ' to support MairaDB installation from debian package system. --- install_roundcube.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/install_roundcube.sh b/install_roundcube.sh index a7bb81a..0fc7cd1 100755 --- a/install_roundcube.sh +++ b/install_roundcube.sh @@ -296,8 +296,14 @@ DEFAULT_APACHE_VHOST_DIR="/usr/local/apache2/conf/vhosts" DEFAULT_DB_HOST="localhost" DEFAULT_DB_NAME="roundcubemail" DEFAULT_DB_USER="roundcube" -DEFAULT_DEBIAN_MYSQL_CREDENTIALS="--defaults-file=/etc/mysql/debian.cnf" -DEFAULT_MYSQL_CREDENTIALS="--defaults-file=/usr/local/mysql/sys-maint.cnf" +if [[ -f "/usr/local/mysql/sys-maint.cnf" ]] ; then + DEFAULT_MYSQL_CREDENTIALS="--defaults-file=/usr/local/mysql/sys-maint.cnf" +elif [[ -f "/etc/mysql/debian.cnf" ]] ; then + DEFAULT_MYSQL_CREDENTIALS="--defaults-file=/etc/mysql/debian.cnf" +else + DEFAULT_MYSQL_CREDENTIALS="" +fi +DEFAULT_DEBIAN_MYSQL_CREDENTIALS="/etc/mysql/debian.cnf" [[ -n "$ROUNDCUBE_VERSION" ]] || fatal "Roundcube Version (ROUNDCUBE_VERSION) not present!" [[ -n "$WEBSITE_NAME" ]] || fatal "Website's name (WEBSITE_NAME) not present!"