clean exit tasks
This commit is contained in:
parent
5222e9e08a
commit
cabd5d75f2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user