Check file rather than directory
This commit is contained in:
parent
313fb432d3
commit
fc298bf82c
|
@ -308,8 +308,8 @@ function backup_database_to_usb {
|
|||
database_name=$1
|
||||
local_database_dir=/root/temp${1}data
|
||||
backup_database_local ${database_name}
|
||||
if [ ! -d ${local_database_dir} ]; then
|
||||
echo $"Error backing up ${1} database to ${local_database_dir}"
|
||||
if [ ! -f ${local_database_dir}/${1}.sql ]; then
|
||||
echo $"Error backing up ${1} database to ${local_database_dir}/${1}.sql"
|
||||
exit 62383
|
||||
fi
|
||||
backup_directory_to_usb ${local_database_dir} ${database_name}data
|
||||
|
|
Loading…
Reference in New Issue