mirror of
https://github.com/deajan/obackup.git
synced 2025-01-12 15:13:53 +01:00
Fixed warnings and errors don't trigger actions on exit
This commit is contained in:
parent
cd1c597e68
commit
546df675e7
@ -47,10 +47,10 @@ function TrapQuit {
|
|||||||
|
|
||||||
# Get ERROR / WARN alert flags from subprocesses that call Logger
|
# Get ERROR / WARN alert flags from subprocesses that call Logger
|
||||||
if [ -f "$RUN_DIR/$PROGRAM.Logger.warn.$SCRIPT_PID.$TSTAMP" ]; then
|
if [ -f "$RUN_DIR/$PROGRAM.Logger.warn.$SCRIPT_PID.$TSTAMP" ]; then
|
||||||
WARN_ALERT=1
|
WARN_ALERT=true
|
||||||
fi
|
fi
|
||||||
if [ -f "$RUN_DIR/$PROGRAM.Logger.error.$SCRIPT_PID.$TSTAMP" ]; then
|
if [ -f "$RUN_DIR/$PROGRAM.Logger.error.$SCRIPT_PID.$TSTAMP" ]; then
|
||||||
ERROR_ALERT=1
|
ERROR_ALERT=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $ERROR_ALERT == true ]; then
|
if [ $ERROR_ALERT == true ]; then
|
||||||
@ -1257,7 +1257,7 @@ function CheckTotalExecutionTime {
|
|||||||
#### Check if max execution time of whole script as been reached
|
#### Check if max execution time of whole script as been reached
|
||||||
if [ $SECONDS -gt $SOFT_MAX_EXEC_TIME_TOTAL ]; then
|
if [ $SECONDS -gt $SOFT_MAX_EXEC_TIME_TOTAL ]; then
|
||||||
Logger "Max soft execution time of the whole backup exceeded." "ERROR"
|
Logger "Max soft execution time of the whole backup exceeded." "ERROR"
|
||||||
WARN_ALERT=1
|
WARN_ALERT=true
|
||||||
SendAlert true
|
SendAlert true
|
||||||
if [ $SECONDS -gt $HARD_MAX_EXEC_TIME_TOTAL ] && [ $HARD_MAX_EXEC_TIME_TOTAL -ne 0 ]; then
|
if [ $SECONDS -gt $HARD_MAX_EXEC_TIME_TOTAL ] && [ $HARD_MAX_EXEC_TIME_TOTAL -ne 0 ]; then
|
||||||
Logger "Max hard execution time of the whole backup exceeded, stopping backup process." "CRITICAL"
|
Logger "Max hard execution time of the whole backup exceeded, stopping backup process." "CRITICAL"
|
||||||
|
Loading…
Reference in New Issue
Block a user