From ec36c5ca12681471cf8855219a4ac47cacca9306 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Wed, 30 Jan 2019 11:50:25 -0700 Subject: [PATCH] fixed incorrectly quoted variables causing cmd errors --- root/NCscripts/backup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/root/NCscripts/backup.sh b/root/NCscripts/backup.sh index b35e6f5..be5434d 100755 --- a/root/NCscripts/backup.sh +++ b/root/NCscripts/backup.sh @@ -151,7 +151,7 @@ function checkExist { ### ncMaint - pass requested mode change type to NextCloud occ function ncMaint { - sudo -u "${webUser}" php "${ncRoot}/occ maintenance:mode" --"$1" \ + sudo -u "${webUser}" php "${ncRoot}/occ" maintenance:mode --"$1" \ >> "$logFile" 2>&1 maintResult="$?" return "$maintResult" @@ -705,7 +705,7 @@ if [ -z "$borgExclude" ]; then # borgExclude is empty echo -e "${info}[$(stamp)] --[INFO] Executing borg without exclusions --" \ "${normal}" >> "$logFile" - borg --show-rc create "${borgCreateParams}" ::`date +%Y-%m-%d_%H%M%S` \ + borg --show-rc create ${borgCreateParams} ::`date +%Y-%m-%d_%H%M%S` \ "${xtraFiles[@]}" \ "${sqlDumpDir}" "${ncDataDir}" \ 2>> "$logFile" @@ -713,7 +713,7 @@ else # borgExclude is not empty echo -e "${info}[$(stamp)] --[INFO] Executing borg with exclusions --" \ "${normal}" >> "$logFile" - borg --show-rc create "${borgCreateParams}" --exclude-from "${borgExclude}" \ + borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \ ::`date +%Y-%m-%d_%H%M%S` \ "${xtraFiles[@]}" \ "${sqlDumpDir}" "${ncDataDir}" \ @@ -741,7 +741,7 @@ if [ -n "$borgPrune" ]; then # parameters defined echo -e "${info}[$(stamp)] --[INFO] Executing borg prune operation --" \ "${normal}" >> "$logFile" - borg prune --show-rc -v ${borgPruneParams} "${borgPrune}" \ + borg prune --show-rc -v ${borgPruneParams} ${borgPrune} \ 2>> "$logFile" # check return-status pruneResult="$?"