Updated exclusion processing section to only warn if errant file specified.
Logs if no file specified to begin with.
This commit is contained in:
parent
2323eb435e
commit
0d018e3b65
@ -627,18 +627,24 @@ if [ -n "$borgXtra" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
## Check if borgExclude exists since borg will throw an error if it's missing
|
## Check if borgExclude exists since borg will throw an error if it's missing
|
||||||
checkExist ff "$borgExclude"
|
if [ -n "$borgExclude" ]; then
|
||||||
checkResult="$?"
|
checkExist ff "$borgExclude"
|
||||||
if [ "$checkResult" = "0" ]; then
|
checkResult="$?"
|
||||||
|
if [ "$checkResult" = "0" ]; then
|
||||||
echo -e "${op}${stamp} Found ${lit}${borgExclude}${normal}" \
|
echo -e "${op}${stamp} Found ${lit}${borgExclude}${normal}" \
|
||||||
>> "$logFile"
|
>> "$logFile"
|
||||||
else
|
else
|
||||||
# file not found, unset the variable so it's like it was not specified
|
# file not found, unset the variable so it's like it was not specified
|
||||||
# in the first place and continue with backup
|
# in the first place and continue with backup
|
||||||
unset borgExclude
|
unset borgExclude
|
||||||
exitWarn+=('2114')
|
exitWarn+=('2114')
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -e "${op}${stamp} Exclusion pattern file not specified." \
|
||||||
|
"No exclusions will be processed${normal}" >> "$logFile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
## Export TMPDIR environment variable for borg via python
|
## Export TMPDIR environment variable for borg via python
|
||||||
## Python requires a writable temporary directory when unpacking borg and
|
## Python requires a writable temporary directory when unpacking borg and
|
||||||
## executing commands. This defaults to /tmp but many systems mount /tmp with
|
## executing commands. This defaults to /tmp but many systems mount /tmp with
|
||||||
|
Loading…
Reference in New Issue
Block a user