From fc298bf82cbb16f5102b8ace617955a39de35e83 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 1 Nov 2016 20:48:47 +0000 Subject: [PATCH] Check file rather than directory --- src/freedombone-utils-backup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index 8520f076..15860a6e 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -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