From 621e0ee9d98b3a71ecfe8d42cd40c04b240e37e3 Mon Sep 17 00:00:00 2001 From: marcos Date: Tue, 19 May 2020 11:52:11 +0200 Subject: [PATCH] fixed error mysqldump --- pandora_server/util/pandora_backup.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pandora_server/util/pandora_backup.sh b/pandora_server/util/pandora_backup.sh index a62f337c71..cd0ae285b9 100755 --- a/pandora_server/util/pandora_backup.sh +++ b/pandora_server/util/pandora_backup.sh @@ -32,6 +32,7 @@ QUIET=0 RESTOREFILES=0 DATABASE=1 TIMESTAMP=`date +"%Y-%m-%d-%H-%M-%S"` +MDE=1 # Main parsing code @@ -71,7 +72,13 @@ done # Execution which mysqldump &>/dev/null -[ $? -eq 0 ] || echo -e "Command Mysqldump not found. \nIn order to make backups it is necessary to have mysqldump on your console." +[ $? -eq 0 ] || MDE=0 + +if [ $MDE == 0 ] +then + echo -e "Command Mysqldump not found. \nIn order to make backups it is necessary to have mysqldump on your console.\nAborting..." + exit 1 +fi if [ ! -e "$PANDORAPATH/include/config.php" ] then