SendAlert now triggered as last action

This commit is contained in:
deajan 2016-08-26 15:09:01 +02:00
parent bf8e45217c
commit 9cfcf338e1
1 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ PROGRAM="obackup"
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr"
PROGRAM_VERSION=2.1-dev
PROGRAM_BUILD=2016082602
PROGRAM_BUILD=2016082603
IS_STABLE=no
source "./ofunctions.sh"
@ -41,17 +41,17 @@ function TrapQuit {
if [ "$RUN_AFTER_CMD_ON_ERROR" == "yes" ]; then
RunAfterHook
fi
SendAlert
CleanUp
Logger "Backup script finished with errors." "ERROR"
SendAlert
exitcode=1
elif [ $WARN_ALERT -ne 0 ]; then
if [ "$RUN_AFTER_CMD_ON_ERROR" == "yes" ]; then
RunAfterHook
fi
SendAlert
CleanUp
Logger "Backup script finished with warnings." "WARN"
SendAlert
exitcode=2
else
RunAfterHook