mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-15 04:24:29 +02:00
update-tunnelbroker: drop main function, use :do with on-error
This commit is contained in:
parent
febd13af13
commit
f0856c264e
1 changed files with 4 additions and 6 deletions
|
@ -13,8 +13,8 @@
|
||||||
:global GlobalFunctionsReady;
|
:global GlobalFunctionsReady;
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||||
|
|
||||||
:local Main do={
|
:do {
|
||||||
:local ScriptName [ :tostr $1 ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global CertificateAvailable;
|
:global CertificateAvailable;
|
||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
:global ScriptLock;
|
:global ScriptLock;
|
||||||
|
|
||||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||||
:return false;
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:if ([ $CertificateAvailable "Starfield Secure Certificate Authority - G2" ] = false) do={
|
:if ([ $CertificateAvailable "Starfield Secure Certificate Authority - G2" ] = false) do={
|
||||||
|
@ -62,6 +62,4 @@
|
||||||
/interface/6to4/set $Interface local-address=$PublicAddress;
|
/interface/6to4/set $Interface local-address=$PublicAddress;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} on-error={ }
|
||||||
|
|
||||||
$Main [ :jobname ];
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue