From f854e31fd6f722162d88bf71de446c9316b7294d Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Sun, 19 May 2019 00:37:43 -0600 Subject: [PATCH] pre-req: seafile data dir --- backup.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backup.sh b/backup.sh index b50cb27..519227a 100755 --- a/backup.sh +++ b/backup.sh @@ -439,7 +439,7 @@ fi checkExist ff "$borgDetails" checkResult="$?" if [ "$checkResult" = "1" ]; then - # sqlDetails file cannot be found + # borgDetails file cannot be found echo -e "\n${err}The file containing your borgbackup details does not" \ "exist (-b parameter)${normal}\n" exit 1 @@ -447,13 +447,13 @@ fi ## Check Seafile data directory # Ensure Seafile data directory is provided -if [ -z "$ncDataDir" ]; then +if [ -z "$dataDir" ]; then echo -e "\n${err}The Seafile data directory must be specified" \ "(-d parameter)${normal}\n" exit 1 # Ensure Seafile data directory exists -elif [ -n "$ncDataDir" ]; then - checkExist fd "$ncDataDir" +else + checkExist fd "$dataDir" checkResult="$?" if [ "$checkResult" = "1" ]; then # Specified Seafile data directory could not be found @@ -743,7 +743,7 @@ if [ -z "$borgExclude" ]; then "${normal}" >> "$logFile" borg --show-rc create ${borgCreateParams} ::`date +%Y-%m-%d_%H%M%S` \ "${xtraFiles[@]}" \ - "${sqlDumpDir}" "${ncDataDir}" \ + "${sqlDumpDir}" "${dataDir}" \ 2>> "$logFile" else # borgExclude is not empty @@ -752,7 +752,7 @@ else borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \ ::`date +%Y-%m-%d_%H%M%S` \ "${xtraFiles[@]}" \ - "${sqlDumpDir}" "${ncDataDir}" \ + "${sqlDumpDir}" "${dataDir}" \ 2>> "$logFile" fi