mirror of
https://github.com/deajan/obackup.git
synced 2024-11-12 19:03:42 +01:00
Simplified cleanup functions
This commit is contained in:
parent
16fc043322
commit
6c9e4082be
@ -50,7 +50,6 @@ function TrapQuit {
|
||||
fi
|
||||
Logger "$PROGRAM finished with errors." "ERROR"
|
||||
SendAlert
|
||||
CleanUp
|
||||
exitcode=1
|
||||
elif [ $WARN_ALERT == true ]; then
|
||||
if [ "$RUN_AFTER_CMD_ON_ERROR" == "yes" ]; then
|
||||
@ -58,12 +57,10 @@ function TrapQuit {
|
||||
fi
|
||||
Logger "$PROGRAM finished with warnings." "WARN"
|
||||
SendAlert
|
||||
CleanUp
|
||||
exitcode=2
|
||||
else
|
||||
RunAfterHook
|
||||
Logger "$PROGRAM finshed without errors." "NOTICE"
|
||||
CleanUp
|
||||
exitcode=0
|
||||
fi
|
||||
|
||||
@ -71,6 +68,7 @@ function TrapQuit {
|
||||
rm -f "$RUN_DIR/$PROGRAM.$INSTANCE_ID"
|
||||
fi
|
||||
|
||||
CleanUp
|
||||
KillChilds $$ > /dev/null 2>&1
|
||||
exit $exitcode
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user