mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-01 00:34:29 +02:00
mod/notification-email: use :onerror for outer block
This commit is contained in:
parent
8cddc63767
commit
862830b341
1 changed files with 6 additions and 6 deletions
|
@ -35,7 +35,7 @@
|
|||
}
|
||||
|
||||
# flush e-mail queue
|
||||
:set FlushEmailQueue do={ :do {
|
||||
:set FlushEmailQueue do={ :onerror Err {
|
||||
:global EmailQueue;
|
||||
|
||||
:global EitherOr;
|
||||
|
@ -135,8 +135,8 @@
|
|||
|
||||
/system/scheduler/set interval=(($SchedVal->"run-count") . "m") \
|
||||
comment="Waiting for retry..." $Scheduler;
|
||||
} on-error={
|
||||
:global ExitError; $ExitError false $0;
|
||||
} do={
|
||||
:global ExitError; $ExitError false $0 $Err;
|
||||
} }
|
||||
|
||||
# generate filter for log-forward
|
||||
|
@ -248,12 +248,12 @@
|
|||
}
|
||||
|
||||
# send notification via e-mail - expects at least two string arguments
|
||||
:set SendEMail do={ :do {
|
||||
:set SendEMail do={ :onerror Err {
|
||||
:global SendEMail2;
|
||||
|
||||
$SendEMail2 ({ origin=$0; subject=$1; message=$2; link=$3 });
|
||||
} on-error={
|
||||
:global ExitError; $ExitError false $0;
|
||||
} do={
|
||||
:global ExitError; $ExitError false $0 $Err;
|
||||
} }
|
||||
|
||||
# send notification via e-mail - expects one array argument
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue