Merge branch 'ent-5524-backups-de-la-base-de-datos-desde-la-consola' into 'develop'

add message if mysqldump is not instaled

See merge request artica/pandorafms!3147
This commit is contained in:
Alejandro Fraguas 2020-05-19 13:22:04 +02:00
commit 29ba717883
1 changed files with 10 additions and 0 deletions

View File

@ -32,6 +32,7 @@ QUIET=0
RESTOREFILES=0
DATABASE=1
TIMESTAMP=`date +"%Y-%m-%d-%H-%M-%S"`
MDE=1
# Main parsing code
@ -70,6 +71,15 @@ done
# Execution
which mysqldump &>/dev/null
[ $? -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
echo "Cannot read config file at $PANDORAPATH/include/config.php. Aborting"