1
0
mirror of https://github.com/deajan/obackup.git synced 2024-12-25 23:13:41 +01:00

SendAlert now triggered as last action

This commit is contained in:
deajan 2016-08-26 15:09:01 +02:00
parent bf8e45217c
commit 9cfcf338e1

View File

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