From dbe0020c85d9a5e5b57bbd853448620c6f516762 Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 8 Aug 2016 00:03:19 +0200 Subject: [PATCH] Fixed wrong variable names --- dev/n_obackup.sh | 17 ++++++++++------- dev/ofunctions.sh | 4 ++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/dev/n_obackup.sh b/dev/n_obackup.sh index bd40e34..7bb8c81 100755 --- a/dev/n_obackup.sh +++ b/dev/n_obackup.sh @@ -1,11 +1,14 @@ #!/usr/bin/env bash +#TODO: rework old IFS= statements + + ###### Remote push/pull (or local) backup script for files & databases PROGRAM="obackup" AUTHOR="(C) 2013-2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=2.1-dev -PROGRAM_BUILD=2016080701 +PROGRAM_BUILD=2016080702 IS_STABLE=yes source "./ofunctions.sh" @@ -946,9 +949,9 @@ function FilesBackup { #do Logger "Beginning file backup of [$BACKUP_TASK]." "NOTICE" if [ "$ENCRYPTION" == "yes" ]; then - Duplicity "$BACKUP_TASK" "recurse" + Duplicity "$backupTask" "recurse" else - Rsync "$BACKUP_TASK" "recurse" + Rsync "$backupTask" "recurse" fi CheckTotalExecutionTime done @@ -961,9 +964,9 @@ function FilesBackup { #do Logger "Beginning non recursive file backup of [$BACKUP_TASK]." "NOTICE" if [ "$ENCRYPTION" == "yes" ]; then - Duplicity "$BACKUP_TASK" "no-recurse" + Duplicity "$backupTask" "no-recurse" else - Rsync "$BACKUP_TASK" "no-recurse" + Rsync "$backupTask" "no-recurse" fi CheckTotalExecutionTime done @@ -976,9 +979,9 @@ function FilesBackup { #do Logger "Beginning recursive file backup of [$BACKUP_TASK]." "NOTICE" if [ "$ENCRYPTION" == "yes" ]; then - Duplicity "$BACKUP_TASK" "recurse" + Duplicity "$backupTask" "recurse" else - Rsync "$BACKUP_TASK" "recurse" + Rsync "$backupTask" "recurse" fi CheckTotalExecutionTime done diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index 6b9847e..000b769 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -1,6 +1,6 @@ #### MINIMAL-FUNCTION-SET BEGIN #### -## FUNC_BUILD=2016080701 +## FUNC_BUILD=2016080702 ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr #TODO: set _LOGGER_PREFIX in other apps, specially for osync daemon mode @@ -572,7 +572,7 @@ function WaitForTaskCompletion { local counting="{6:-true}" # Count time since function launch if true, script launch if false Logger "${FUNCNAME[0]} called by [$caller_name]." "PARANOIA_DEBUG" #__WITH_PARANOIA_DEBUG - __CheckArguments 5 $# ${FUNCNAME[0]} "$@" #__WITH_PARANOIA_DEBUG + __CheckArguments 6 $# ${FUNCNAME[0]} "$@" #__WITH_PARANOIA_DEBUG local soft_alert=0 # Does a soft alert need to be triggered, if yes, send an alert once local log_ttime=0 # local time instance for comparaison