From c310fbff74f2878c83fc653fa7bbdd99362bfbcf Mon Sep 17 00:00:00 2001 From: trevorb Date: Mon, 21 Jul 2025 14:28:17 +1000 Subject: [PATCH] update check if mariadb running and exit --- root/etc/e-smith/events/actions/mysql-update-innodb-page-size | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/etc/e-smith/events/actions/mysql-update-innodb-page-size b/root/etc/e-smith/events/actions/mysql-update-innodb-page-size index 5780b84..058304b 100644 --- a/root/etc/e-smith/events/actions/mysql-update-innodb-page-size +++ b/root/etc/e-smith/events/actions/mysql-update-innodb-page-size @@ -5,7 +5,7 @@ event=$1 # check we run as post-install event or return [[ "$event" == "post-install" ]] || exit 0 # check mariadb is not running or return -/usr/bin/systemctl is-active mariadb -q && exit 0 +/usr/bin/pgrep mariadbd && exit 0 # ONLY delete the mysql data dirictory if it is initial state # we assume if only mysql, test, sys and performance_schema this is the case validdirs="/var/lib/mysql/mysql/ /var/lib/mysql/performance_schema/ /var/lib/mysql/sys/ /var/lib/mysql/test/" @@ -17,5 +17,5 @@ done # we use find as glob will ignore dot starting filename # rm -rf /var/lib/mysql/* find /var/lib/mysql -mindepth 1 -maxdepth 1 -print0 | xargs -0 rm -rf -return 0 +exit 0