diff --git a/backup.sh b/backup.sh index 450bb41..33ff1b1 100755 --- a/backup.sh +++ b/backup.sh @@ -1,7 +1,7 @@ #!/bin/bash # Get hostname: try read from file, else get from env -[ -z "${MYSQL_HOST_FILE}" ] || { MYSQL_USER=$(head -1 "${MYSQL_HOST_FILE}"); } +[ -z "${MYSQL_HOST_FILE}" ] || { MYSQL_HOST=$(head -1 "${MYSQL_HOST_FILE}"); } [ -z "${MYSQL_HOST}" ] && { echo "=> MYSQL_HOST cannot be empty" && exit 1; } # Get username: try read from file, else get from env [ -z "${MYSQL_USER_FILE}" ] || { MYSQL_USER=$(head -1 "${MYSQL_USER_FILE}"); } diff --git a/restore.sh b/restore.sh index e17b61c..0607d6f 100755 --- a/restore.sh +++ b/restore.sh @@ -1,7 +1,7 @@ #!/bin/bash # Get hostname: try read from file, else get from env -[ -z "${MYSQL_HOST_FILE}" ] || { MYSQL_USER=$(head -1 "${MYSQL_HOST_FILE}"); } +[ -z "${MYSQL_HOST_FILE}" ] || { MYSQL_HOST=$(head -1 "${MYSQL_HOST_FILE}"); } [ -z "${MYSQL_HOST}" ] && { echo "=> MYSQL_HOST cannot be empty" && exit 1; } # Get username: try read from file, else get from env [ -z "${MYSQL_USER_FILE}" ] || { MYSQL_USER=$(head -1 "${MYSQL_USER_FILE}"); }