1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

daily-psk: drop main function, use :do with on-error

This commit is contained in:
Christian Hesse
2024-03-06 15:28:55 +01:00
parent 4ada2e7678
commit f79206a9b8
4 changed files with 16 additions and 24 deletions

@ -14,8 +14,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local Main do={
:local ScriptName [ :tostr $1 ];
:do {
:local ScriptName [ :jobname ];
:global DailyPskMatchComment;
:global DailyPskQrCodeUrl;
@ -31,7 +31,7 @@
:global WaitFullyConnected;
:if ([ $ScriptLock $ScriptName ] = false) do={
:return false;
:error false;
}
$WaitFullyConnected;
@ -89,6 +89,4 @@
}
}
}
}
$Main [ :jobname ];
} on-error={ }

@ -14,8 +14,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local Main do={
:local ScriptName [ :tostr $1 ];
:do {
:local ScriptName [ :jobname ];
:global DailyPskMatchComment;
:global DailyPskQrCodeUrl;
@ -31,7 +31,7 @@
:global WaitFullyConnected;
:if ([ $ScriptLock $ScriptName ] = false) do={
:return false;
:error false;
}
$WaitFullyConnected;
@ -88,6 +88,4 @@
}
}
}
}
$Main [ :jobname ];
} on-error={ }

@ -15,8 +15,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local Main do={
:local ScriptName [ :tostr $1 ];
:do {
:local ScriptName [ :jobname ];
:global DailyPskMatchComment;
:global DailyPskQrCodeUrl;
@ -32,7 +32,7 @@
:global WaitFullyConnected;
:if ([ $ScriptLock $ScriptName ] = false) do={
:return false;
:error false;
}
$WaitFullyConnected;
@ -104,6 +104,4 @@
}
}
}
}
$Main [ :jobname ];
} on-error={ }

@ -14,8 +14,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local Main do={
:local ScriptName [ :tostr $1 ];
:do {
:local ScriptName [ :jobname ];
:global DailyPskMatchComment;
:global DailyPskQrCodeUrl;
@ -31,7 +31,7 @@
:global WaitFullyConnected;
:if ([ $ScriptLock $ScriptName ] = false) do={
:return false;
:error false;
}
$WaitFullyConnected;
@ -89,6 +89,4 @@
}
}
}
}
$Main [ :jobname ];
} on-error={ }