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,7 +4,7 @@ set -o pipefail
4 4
5 PATH="$PATH:/usr/local/bin:/usr/local/sbin" 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 DB_USER="" 9 DB_USER=""
10 10
@@ -68,12 +68,14 @@ function READ_DBS() @@ -68,12 +68,14 @@ function READ_DBS()
68 DB_LIST=$(mysql -N --host=${DB_HOST} --user=${DB_USER} --password=${DB_PASSWORD} -e "$sql") &> /dev/null 68 DB_LIST=$(mysql -N --host=${DB_HOST} --user=${DB_USER} --password=${DB_PASSWORD} -e "$sql") &> /dev/null
69 if [ $? -ne 0 ]; then 69 if [ $? -ne 0 ]; then
70 LOG "ERROR: Getting list of databases failed." 70 LOG "ERROR: Getting list of databases failed."
  71 + DELETE_TMP_FOLDER
71 exit 2 72 exit 2
72 else 73 else
73 if [[ -n $DB_LIST ]]; then 74 if [[ -n $DB_LIST ]]; then
74 LOG "SUCCESS: Getting list of databases success." 75 LOG "SUCCESS: Getting list of databases success."
75 else 76 else
76 LOG "ERROR: List of databases is empty." 77 LOG "ERROR: List of databases is empty."
  78 + DELETE_TMP_FOLDER
77 exit 2 79 exit 2
78 fi 80 fi
79 fi 81 fi