mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-03 17:54:47 +02:00
mod/notification-gotify: use :onerror for outer block
This commit is contained in:
parent
862830b341
commit
9d845d40f0
1 changed files with 6 additions and 6 deletions
|
@ -17,7 +17,7 @@
|
|||
:global SendGotify2;
|
||||
|
||||
# flush Gotify queue
|
||||
:set FlushGotifyQueue do={ :do {
|
||||
:set FlushGotifyQueue do={ :onerror Err {
|
||||
:global GotifyQueue;
|
||||
|
||||
:global IsFullyConnected;
|
||||
|
@ -53,8 +53,8 @@
|
|||
/system/scheduler/remove [ find where name="_FlushGotifyQueue" ];
|
||||
:set GotifyQueue;
|
||||
}
|
||||
} on-error={
|
||||
:global ExitError; $ExitError false $0;
|
||||
} do={
|
||||
:global ExitError; $ExitError false $0 $Err;
|
||||
} }
|
||||
|
||||
# send notification via Gotify - expects one array argument
|
||||
|
@ -121,12 +121,12 @@
|
|||
}
|
||||
|
||||
# send notification via Gotify - expects at least two string arguments
|
||||
:set SendGotify do={ :do {
|
||||
:set SendGotify do={ :onerror Err {
|
||||
:global SendGotify2;
|
||||
|
||||
$SendGotify2 ({ origin=$0; subject=$1; message=$2; link=$3; silent=$4 });
|
||||
} on-error={
|
||||
:global ExitError; $ExitError false $0;
|
||||
} do={
|
||||
:global ExitError; $ExitError false $0 $Err;
|
||||
} }
|
||||
|
||||
# send notification via Gotify - expects one array argument
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue