Removed trailing slash on base_dir variable. Type-matched clean503 var.

This commit is contained in:
Asif Bacchus 2018-10-16 02:33:28 -06:00
parent aca45311ea
commit 0d1e85179a
1 changed files with 4 additions and 4 deletions

View File

@ -166,7 +166,7 @@ function cleanup {
## remove 503 error page ## remove 503 error page
# check value of 'clean503' to see if this is necessary (=1) otherwise, skip # check value of 'clean503' to see if this is necessary (=1) otherwise, skip
if [ "$clean503" -eq 1 ]; then if [ "$clean503" = "1" ]; then
# proceed with cleanup # proceed with cleanup
echo -e "${op}${stamp} Removing 503 error page..." >> "$logFile" echo -e "${op}${stamp} Removing 503 error page..." >> "$logFile"
rm -f "$webroot/$err503File" >> "$logFile" 2>&1 rm -f "$webroot/$err503File" >> "$logFile" 2>&1
@ -559,7 +559,7 @@ else
quit quit
fi fi
echo -e "${op}${stamp} Borg base dir... OK${normal}" >> "$logFile" echo -e "${op}${stamp} Borg base dir... OK${normal}" >> "$logFile"
export BORG_BASE_DIR="${borgConfig[0]}" export BORG_BASE_DIR="${borgConfig[0]%/}"
fi fi
# check: path to SSH keyfile # check: path to SSH keyfile
if [ -z "${borgConfig[1]}" ]; then if [ -z "${borgConfig[1]}" ]; then
@ -628,7 +628,7 @@ if [ -n "$borgXtra" ]; then
else else
# no extra locations specified # no extra locations specified
echo -e "${op}${stamp} No additional locations specified for backup." \ echo -e "${op}${stamp} No additional locations specified for backup." \
"only NextCloud data files will be backed up${normal}" >> "$logFile" "Only NextCloud data files will be backed up${normal}" >> "$logFile"
exitWarn+=('2116') exitWarn+=('2116')
fi fi
@ -663,7 +663,7 @@ checkExist fd "$BORG_BASE_DIR/tmp"
checkResult="$?" checkResult="$?"
if [ "$checkResult" = "1" ]; then if [ "$checkResult" = "1" ]; then
# folder not found # folder not found
echo -e "${op}${stamp} tmp folder not found... creating ${lit}" \ echo -e "${op}${stamp} tmp folder not found... creating${lit}" \
"${BORG_BASE_DIR}/tmp${normal}" >> "$logFile" "${BORG_BASE_DIR}/tmp${normal}" >> "$logFile"
mkdir "$BORG_BASE_DIR/tmp" 2>> "$logFile" mkdir "$BORG_BASE_DIR/tmp" 2>> "$logFile"
# verify folder created # verify folder created