mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
mode-button-event: use $LogPrintExit
This commit is contained in:
parent
413287586f
commit
289fd215c4
1 changed files with 4 additions and 2 deletions
|
@ -7,15 +7,17 @@
|
|||
|
||||
:global ModeButton;
|
||||
|
||||
:global LogPrintExit;
|
||||
|
||||
:set ($ModeButton->"count") ($ModeButton->"count" + 1);
|
||||
|
||||
:local Scheduler [ / system scheduler find where name="mode-button-scheduler" ];
|
||||
|
||||
:if ([ :len $Scheduler ] = 0) do={
|
||||
:log info "Creating mode-button scheduler, counting presses...";
|
||||
$LogPrintExit info ("Creating mode-button scheduler, counting presses...") false;
|
||||
/ system scheduler add name="mode-button-scheduler" \
|
||||
on-event="/ system script run mode-button-scheduler;" interval=3s;
|
||||
} else={
|
||||
:log debug "Updating mode-button-scheduler...";
|
||||
$LogPrintExit debug ("Updating mode-button-scheduler...") false;
|
||||
/ system scheduler set $Scheduler start-time=[ /system clock get time ];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue