mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-10 10:04:28 +02:00
sms-action: use $ExitError to indicate unintentional error
This commit is contained in:
parent
be05480071
commit
ede351f47e
1 changed files with 5 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
|||
:global GlobalFunctionsReady;
|
||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||
|
||||
:local ExitOK false;
|
||||
:do {
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
|
@ -23,6 +24,7 @@
|
|||
|
||||
:if ([ :typeof $Action ] = "nothing") do={
|
||||
$LogPrint error $ScriptName ("This script is supposed to run from SMS hook with action=...");
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
}
|
||||
|
||||
|
@ -34,4 +36,6 @@
|
|||
} else={
|
||||
$LogPrint warning $ScriptName ("The code for action '" . $Action . "' failed syntax validation!");
|
||||
}
|
||||
} on-error={ }
|
||||
} on-error={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue