clean exit tasks

This commit is contained in:
Asif Bacchus 2019-05-27 05:40:10 -06:00
parent 5222e9e08a
commit cabd5d75f2
1 changed files with 13 additions and 3 deletions

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