Commit ddce5ec70f8ee02b767f6803bc1671439a05f671

Authored by Уласов Алексей
1 parent 2f0bdbb0

Edit log file name.

Showing 1 changed file with 3 additions and 1 deletions
backup_mysql.sh
... ... @@ -4,7 +4,7 @@ set -o pipefail
4 4  
5 5 PATH="$PATH:/usr/local/bin:/usr/local/sbin"
6 6  
7   -SCRIPT_LOG=/var/log/backups_mysql.log
  7 +SCRIPT_LOG=/var/log/backup_mysql.log
8 8  
9 9 DB_USER=""
10 10  
... ... @@ -68,12 +68,14 @@ function READ_DBS()
68 68 DB_LIST=$(mysql -N --host=${DB_HOST} --user=${DB_USER} --password=${DB_PASSWORD} -e "$sql") &> /dev/null
69 69 if [ $? -ne 0 ]; then
70 70 LOG "ERROR: Getting list of databases failed."
  71 + DELETE_TMP_FOLDER
71 72 exit 2
72 73 else
73 74 if [[ -n $DB_LIST ]]; then
74 75 LOG "SUCCESS: Getting list of databases success."
75 76 else
76 77 LOG "ERROR: List of databases is empty."
  78 + DELETE_TMP_FOLDER
77 79 exit 2
78 80 fi
79 81 fi
... ...