From 8f2c7792746aa8f5a337b54d0f45574483541d43 Mon Sep 17 00:00:00 2001 From: Bill Maxwell Date: Mon, 8 Aug 2022 15:52:16 -0700 Subject: [PATCH] Moved restore in progress lock The file wasn't being put in the right spot because the env var wasn't defined yet. Signed-off-by: Bill Maxwell --- mariadb/scripts/restore.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mariadb/scripts/restore.sh b/mariadb/scripts/restore.sh index 358b27c..232fe22 100755 --- a/mariadb/scripts/restore.sh +++ b/mariadb/scripts/restore.sh @@ -2,14 +2,14 @@ set -e -touch ${backup_root_dir}/restore_in_progress - backup_filename=${1} backup_dir_name="${1%.*}" backup_root_dir='/backups' backup_to_restore="${backup_root_dir}/${backup_filename}" +touch ${backup_root_dir}/restore_in_progress + if [ ! -f "${backup_to_restore}" ]; then echo "Backup file ${backup_to_restore} not found!" exit 1