This commit is contained in:
Bob Mottram 2015-09-22 19:43:02 +01:00
parent 22cd2dda75
commit 5ee5d8445f
1 changed files with 14 additions and 14 deletions

View File

@ -2416,10 +2416,9 @@ function get_mariadb_owncloud_admin_password {
} }
function backup_directory_to_usb { function backup_directory_to_usb {
if [ ! -d ${1} ]; then echo "if [ ! -d ${1} ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
echo "WARNING: directory does not exist: ${1}" echo " echo \"WARNING: directory does not exist: ${1}\"" >> /usr/bin/$BACKUP_SCRIPT_NAME
return echo 'else' >> /usr/bin/$BACKUP_SCRIPT_NAME
fi
if [[ $BACKUP_TYPE == 'obnam' ]]; then if [[ $BACKUP_TYPE == 'obnam' ]]; then
BACKUP_KEY_EXISTS=$(gpg --list-keys "$MY_NAME (backup key)") BACKUP_KEY_EXISTS=$(gpg --list-keys "$MY_NAME (backup key)")
@ -2447,6 +2446,7 @@ function backup_directory_to_usb {
echo " shred -zu ${1}/*" >> /usr/bin/$BACKUP_SCRIPT_NAME echo " shred -zu ${1}/*" >> /usr/bin/$BACKUP_SCRIPT_NAME
echo " rm -rf ${1}" >> /usr/bin/$BACKUP_SCRIPT_NAME echo " rm -rf ${1}" >> /usr/bin/$BACKUP_SCRIPT_NAME
fi fi
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
} }
function backup_database { function backup_database {