Skip to content
This repository has been archived by the owner on Nov 28, 2020. It is now read-only.

Commit

Permalink
fixed incorrectly quoted variables causing cmd errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Asif Bacchus committed Jan 30, 2019
1 parent 3b7722a commit ec36c5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions root/NCscripts/backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -705,15 +705,15 @@ 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"
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}" \
Expand Down Expand Up @@ -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="$?"
Expand Down

0 comments on commit ec36c5c

Please sign in to comment.