mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-01-21 16:39:32 +00:00
update-gre-address: early exit with :exit
This commit is contained in:
parent
bde3c3d0f6
commit
1ce8a54440
1 changed files with 2 additions and 4 deletions
|
|
@ -9,7 +9,6 @@
|
||||||
# ipsec remote peer
|
# ipsec remote peer
|
||||||
# https://rsc.eworm.de/doc/update-gre-address.md
|
# https://rsc.eworm.de/doc/update-gre-address.md
|
||||||
|
|
||||||
:local ExitOK false;
|
|
||||||
:onerror Err {
|
:onerror Err {
|
||||||
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
:global GlobalConfigReady; :global GlobalFunctionsReady;
|
||||||
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
|
||||||
|
|
@ -21,8 +20,7 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:set ExitOK true;
|
:exit;
|
||||||
:error false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/interface/gre/set remote-address=0.0.0.0 disabled=yes [ find where !running !disabled ];
|
/interface/gre/set remote-address=0.0.0.0 disabled=yes [ find where !running !disabled ];
|
||||||
|
|
@ -42,5 +40,5 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} do={
|
} do={
|
||||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
:global ExitError; $ExitError false [ :jobname ] $Err;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue