clean exit tasks

This commit is contained in:
Asif Bacchus 2019-05-27 05:40:10 -06:00
parent 5222e9e08a
commit cabd5d75f2

View File

@ -603,14 +603,24 @@ if [ -n "${borgPruneResult}" ]; then
fi
### all processes successfully completed, cleanup and exit gracefully
# note successful completion of borg commands
printf "${ok}[%s] -- [SUCCESS] Backup operations completed --${norm}\n" \
"$(stamp)" >> "$logFile"
# cleanup
cleanup
# note complete success and exit
printf "${ok}[%s] -- [SUCCESS] All processes completed --${norm}\n" \
"$(stamp)" >> "$logFile"
printf "${mag}[%s] --- %s execution completed ---${norm}\n" \
"$(stamp)" "$scriptName" >> "$logFile"
exit 0
### error codes
# 1: parameter error
# 2: not run as root