mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-16 04:54:28 +02:00
mode-button-scheduler: use $LogPrintExit
This commit is contained in:
parent
93e72b5d07
commit
b17ca4bb63
1 changed files with 4 additions and 2 deletions
|
@ -7,6 +7,8 @@
|
|||
|
||||
:global ModeButton;
|
||||
|
||||
:global LogPrintExit;
|
||||
|
||||
:local Count ($ModeButton->"count");
|
||||
:local Code ($ModeButton->[ :tostr $Count ]);
|
||||
|
||||
|
@ -14,7 +16,7 @@
|
|||
/ system scheduler remove mode-button-scheduler;
|
||||
|
||||
:if ([ :len $Code ] > 0) do={
|
||||
:log info ("Acting on " . $Count . " mode-button presses: " . $Code);
|
||||
$LogPrintExit info ("Acting on " . $Count . " mode-button presses: " . $Code) false;
|
||||
|
||||
:if ([ / system routerboard settings get silent-boot ] = false) do={
|
||||
:for I from=1 to=$Count do={
|
||||
|
@ -28,5 +30,5 @@
|
|||
:local Parsed [ :parse $Code ];
|
||||
$Parsed;
|
||||
} else={
|
||||
:log info ("No action defined for " . $Count . " mode-button presses.");
|
||||
$LogPrintExit info ("No action defined for " . $Count . " mode-button presses.") false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue