From d132ed736ada87a06d5d7ac0366257d595353f74 Mon Sep 17 00:00:00 2001 From: Christoph Date: Mon, 15 Dec 2025 01:22:04 +0100 Subject: [PATCH] mysqlshow is no longer available on debian 13 (trixie). --- install_nextcloud.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/install_nextcloud.sh b/install_nextcloud.sh index 4fbf7ae..43ad656 100755 --- a/install_nextcloud.sh +++ b/install_nextcloud.sh @@ -240,7 +240,7 @@ systemd_supported=false systemd=$(which systemd) systemctl=$(which systemctl) -if [[ -n "$systemd" ]] && [[ -n "$systemctl" ]] ; then +if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then systemd_supported=true fi @@ -2704,7 +2704,14 @@ checks_all_is_fine=true # - if [[ "$DATABASE_TYPE" = "mysql" ]] ; then - if [[ ! "$(mysqlshow -h $DATABASE_HOST -u $DATABASE_USER -p$DATABASE_PASS $DATABASE_NAME 2>/dev/null)" ]] ; then + + if ! mysql \ + -h "$DATABASE_HOST" \ + -u "$DATABASE_USER" \ + -p"$DATABASE_PASS" \ + "$DATABASE_NAME" \ + -e "SELECT 1;" >/dev/null 2>&1 + then fatal "Cannot connect database \033[1m$DATABASE_NAME\033[m!" fi