From 444f737ac2c865519c34ddc4b5d0ad9bc780f11c Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Sun, 14 Oct 2018 06:47:22 -0600 Subject: [PATCH] Added parameter for nextcloud data directory --- backup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index 9936d0a..f5ec5ea 100755 --- a/backup.sh +++ b/backup.sh @@ -150,6 +150,7 @@ unset ncRoot unset webUser unset clean503 unset sqlParams +unset ncDataDir unset borgXtra unset borgExclude unset borgPrune @@ -195,7 +196,7 @@ if [ -n "$1" ] && [[ ! "$1" =~ ^- ]]; then fi # use GetOpts to process parameters -while getopts ':l:n:u:v5:w:s:b:' PARAMS; do +while getopts ':l:n:u:v5:w:s:b:d:' PARAMS; do case "$PARAMS" in l) # use provided location for logFile @@ -231,6 +232,10 @@ while getopts ':l:n:u:v5:w:s:b:' PARAMS; do # path to file containing borgbackup settings and details borgDetails="${OPTARG%/}" ;; + d) + # nextcloud data directory + ncDataDir="${OPTARG%/}" + ;; ?) # unrecognized parameters trigger scriptHelp scriptHelp