diff options
author | Christian Hesse <mail@eworm.de> | 2024-12-06 15:17:57 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-12-06 15:17:57 +0100 |
commit | 69b724ccb959cce783ccef4fc339f314ae5d97b7 (patch) | |
tree | 2a8e7ff583d6efabcd6b3b0b17ecf75a3b0c60af | |
parent | 43d0f9f371945b2f6178ba2de13227251683d414 (diff) | |
download | routeros-scripts-custom-69b724ccb959cce783ccef4fc339f314ae5d97b7.tar.gz routeros-scripts-custom-69b724ccb959cce783ccef4fc339f314ae5d97b7.tar.zst |
-rw-r--r-- | hello-world.rsc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hello-world.rsc b/hello-world.rsc index e3ebf8a..2064bfd 100644 --- a/hello-world.rsc +++ b/hello-world.rsc @@ -9,6 +9,7 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:local ExitOK false; :do { :local ScriptName [ :jobname ]; @@ -21,4 +22,6 @@ } else={ $SendNotification2 ({ origin=$ScriptName; subject="Hello..."; message="... world!" }); } -} on-error={ } +} on-error={ + :global ExitError; $ExitError $ExitOK [ :jobname ]; +} |