Check file rather than directory

This commit is contained in:
Bob Mottram 2016-11-01 20:48:47 +00:00
parent 313fb432d3
commit fc298bf82c
1 changed files with 2 additions and 2 deletions

View File

@ -308,8 +308,8 @@ function backup_database_to_usb {
database_name=$1 database_name=$1
local_database_dir=/root/temp${1}data local_database_dir=/root/temp${1}data
backup_database_local ${database_name} backup_database_local ${database_name}
if [ ! -d ${local_database_dir} ]; then if [ ! -f ${local_database_dir}/${1}.sql ]; then
echo $"Error backing up ${1} database to ${local_database_dir}" echo $"Error backing up ${1} database to ${local_database_dir}/${1}.sql"
exit 62383 exit 62383
fi fi
backup_directory_to_usb ${local_database_dir} ${database_name}data backup_directory_to_usb ${local_database_dir} ${database_name}data