|
|
|
@ -390,7 +390,7 @@ if ! exportDir=$( mktemp -d 2>>"$logFile" ); then
|
|
|
|
|
exitError 111 "Could not create temporary directory for exported EML files"
|
|
|
|
|
fi
|
|
|
|
|
# grant pilerUser permission to write to temporary directory
|
|
|
|
|
if ! chown root:${pilerUser} "$exportDir" && chmod 770 "$exportDir"; then
|
|
|
|
|
if ! (chown root:${pilerUser} "$exportDir" && chmod 770 "$exportDir"); then
|
|
|
|
|
exitError 112 "Could not set permissions on temporary directory"
|
|
|
|
|
fi
|
|
|
|
|
if ! cd "$exportDir"; then
|
|
|
|
@ -552,9 +552,8 @@ borgResult="$?"
|
|
|
|
|
|
|
|
|
|
## check borg exit status
|
|
|
|
|
if [ "$borgResult" -eq 0 ]; then
|
|
|
|
|
printf "${ok}[%s] -- [SUCCESS] Borg backup completed " \
|
|
|
|
|
printf "${ok}[%s] -- [SUCCESS] Borg backup completed --${norm}\n" \
|
|
|
|
|
"$(stamp)" >> "$logFile"
|
|
|
|
|
printf "successfully --${norm}\n" >> "$logFile"
|
|
|
|
|
elif [ "$borgResult" -eq 1 ]; then
|
|
|
|
|
printf "${warn}[%s] -- [WARNING] Borg completed with warnings. " \
|
|
|
|
|
"$(stamp)" >> "$logFile"
|
|
|
|
@ -621,8 +620,7 @@ printf "${ok}[%s] -- [SUCCESS] Backup operations completed --${norm}\n" \
|
|
|
|
|
cleanup
|
|
|
|
|
|
|
|
|
|
# note complete success, tally warnings and exit
|
|
|
|
|
printf "${ok}[%s] -- [SUCCESS] All processes completed successfully --" \
|
|
|
|
|
"${norm}\n" \
|
|
|
|
|
printf "${ok}[%s] -- [SUCCESS] All processes completed --${norm}\n" \
|
|
|
|
|
"$(stamp)" >> "$logFile"
|
|
|
|
|
printf "${magenta}[%s] --- %s execution completed ---${norm}\n" \
|
|
|
|
|
"$(stamp)" "$scriptName" >> "$logFile"
|
|
|
|
|