Showing 1 changed files with 2 additions and 3 deletions
+2 -3
rtcwake
... ...
@@ -29,10 +29,9 @@ case "$1/$2" in
29 29
             COUNT=1
30 30
             while sleep $WAIT_TRIGGER_DELAY && eval $WAIT_TRIGGER; do
31 31
                 let COUNT++ && [ $COUNT -lt $MAX_TRIGGER ] || {
32
-                    if test -n "$MAIL_ERROR"; then
33
-                        echo -e "WAIT_TRIGGER_DELAY=$WAIT_TRIGGER_DELAY\nMAX_TRIGGER=$MAX_TRIGGER\nWAIT_TRIGGER=$WAIT_TRIGGER\n\n" | mail -s "${0##*/}" $MAIL_ERROR
32
+                    if test -n "$ON_ERROR"; then
33
+                        eval "$ON_ERROR"
34 34
                     fi
35
-                    exit 0
36 35
                 }
37 36
             done
38 37
             rtcwake -m mem -t $RTCWAKE_TIME