Skip to content
Snippets Groups Projects
Commit f04afc2a authored by Bob Mottram's avatar Bob Mottram
Browse files

Remove restore directory if it exists

parent e18eb98d
No related branches found
No related tags found
No related merge requests found
......@@ -562,6 +562,9 @@ function restore_database {
if [ -d $USB_MOUNT/backup/${restore_app_name} ]; then
echo $"Restoring ${restore_app_name} database"
local_database_dir=/root/temp${restore_app_name}data
if [ -d ${local_database_dir} ]; then
rm -rf ${local_database_dir}
fi
function_check restore_directory_from_usb
restore_directory_from_usb "${local_database_dir}" "${restore_app_name}data"
if [ ! -f /root/temp${restore_app_name}data/${RESTORE_SUBDIR}/temp${restore_app_name}data/${restore_app_name}.sql ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment