don't backup non-existent directories
This commit is contained in:
parent
2e2d55c058
commit
9281605a7d
|
@ -2416,6 +2416,11 @@ function get_mariadb_owncloud_admin_password {
|
|||
}
|
||||
|
||||
function backup_directory_to_usb {
|
||||
if [ ! -d ${1} ]; then
|
||||
echo "WARNING: directory does not exist: ${1}"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ $BACKUP_TYPE == 'obnam' ]]; then
|
||||
BACKUP_KEY_EXISTS=$(gpg --list-keys "$MY_NAME (backup key)")
|
||||
if [ ! "$?" = "0" ]; then
|
||||
|
|
Loading…
Reference in New Issue