Skip to content
Snippets Groups Projects
Commit 665d0080 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

mysql dump/ restore - process check for mysqld or mariadb

parent 91eaa1a7
No related branches found
No related tags found
No related merge requests found
...@@ -393,7 +393,7 @@ function j_requireBinary(){ ...@@ -393,7 +393,7 @@ function j_requireBinary(){
# ------------------------------------------------------------ # ------------------------------------------------------------
function j_requireProcess(){ function j_requireProcess(){
# echo "CHECK process $1" # echo "CHECK process $1"
ps -ef | grep -v grep | grep "$1" >/dev/null ps -ef | grep -v grep | grep -E "$1" >/dev/null
rcself=$? rcself=$?
if [ $rcself -ne 0 ]; then if [ $rcself -ne 0 ]; then
rc=$rc+$rcself rc=$rc+$rcself
......
...@@ -106,9 +106,9 @@ function restoreByFile(){ ...@@ -106,9 +106,9 @@ function restoreByFile(){
# ----- check requirements # ----- check requirements
j_requireBinary "mysql" 1 j_requireBinary "mysql" 1
j_requireBinary "mysqldump" 1 j_requireBinary "mysqldump" 1
j_requireProcess "mysqld" 1 j_requireProcess "mysqld|mariadb" 1
if [ ! -d $SOURCE_DIR ]; then if [ ! -d $SOURCE_DIR ]; then
echo "INFO: driectory $SOURCE_DIR doees not exist." echo "INFO: driectory $SOURCE_DIR doees not exist."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment