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

Check file rather than directory

parent 313fb432
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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