Remove restore directory if it exists
This commit is contained in:
parent
e18eb98ded
commit
f04afc2a39
|
@ -562,6 +562,9 @@ function restore_database {
|
||||||
if [ -d $USB_MOUNT/backup/${restore_app_name} ]; then
|
if [ -d $USB_MOUNT/backup/${restore_app_name} ]; then
|
||||||
echo $"Restoring ${restore_app_name} database"
|
echo $"Restoring ${restore_app_name} database"
|
||||||
local_database_dir=/root/temp${restore_app_name}data
|
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
|
function_check restore_directory_from_usb
|
||||||
restore_directory_from_usb "${local_database_dir}" "${restore_app_name}data"
|
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
|
if [ ! -f /root/temp${restore_app_name}data/${RESTORE_SUBDIR}/temp${restore_app_name}data/${restore_app_name}.sql ]; then
|
||||||
|
|
Loading…
Reference in New Issue