From 665d0080e3986d25d12508aada62dcda4ec31600 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch> Date: Wed, 17 Mar 2021 09:28:21 +0100 Subject: [PATCH] mysql dump/ restore - process check for mysqld or mariadb --- jobhelper.sh | 2 +- localdump_mysql.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jobhelper.sh b/jobhelper.sh index 1c45f7b..52c1d6c 100755 --- a/jobhelper.sh +++ b/jobhelper.sh @@ -393,7 +393,7 @@ function j_requireBinary(){ # ------------------------------------------------------------ function j_requireProcess(){ # echo "CHECK process $1" - ps -ef | grep -v grep | grep "$1" >/dev/null + ps -ef | grep -v grep | grep -E "$1" >/dev/null rcself=$? if [ $rcself -ne 0 ]; then rc=$rc+$rcself diff --git a/localdump_mysql.sh b/localdump_mysql.sh index 8bb5abf..6e37b77 100755 --- a/localdump_mysql.sh +++ b/localdump_mysql.sh @@ -106,9 +106,9 @@ function restoreByFile(){ # ----- check requirements -j_requireBinary "mysql" 1 -j_requireBinary "mysqldump" 1 -j_requireProcess "mysqld" 1 +j_requireBinary "mysql" 1 +j_requireBinary "mysqldump" 1 +j_requireProcess "mysqld|mariadb" 1 if [ ! -d $SOURCE_DIR ]; then echo "INFO: driectory $SOURCE_DIR doees not exist." -- GitLab