mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
drop script 'daily-psk-schedule'
We have some useful functions that can replace the functionality. Just add a schedule like this: add name=daily-psk-startup on-event=":delay 1s; :global WaitTimeSync; \$WaitTimeSync; / system script run daily-psk.local;" start-time=startup
This commit is contained in:
parent
19b80ee063
commit
125f37615b
1 changed files with 0 additions and 28 deletions
|
@ -1,28 +0,0 @@
|
||||||
#!rsc
|
|
||||||
# RouterOS script: daily-psk-schedule
|
|
||||||
# Copyright (c) 2013-2020 Christian Hesse <mail@eworm.de>
|
|
||||||
#
|
|
||||||
# schedule daily-psk on startup
|
|
||||||
|
|
||||||
:global MailServerIsUp;
|
|
||||||
:global TimeIsSync;
|
|
||||||
|
|
||||||
:local Scheduler [ / system scheduler find where name="daily-psk-schedule" ];
|
|
||||||
|
|
||||||
:if ([ / system scheduler get $Scheduler interval ] = 0s) do={
|
|
||||||
/ system scheduler set interval=15s $Scheduler;
|
|
||||||
} else={
|
|
||||||
:if ($MailServerIsUp = false) do={
|
|
||||||
:log warning "Mail server is not up.";
|
|
||||||
:error "Warning: See log for details.";
|
|
||||||
}
|
|
||||||
|
|
||||||
:if ($TimeIsSync = false) do={
|
|
||||||
:log warning "Time is not yet synchronized.";
|
|
||||||
:error "Warning: See log for details.";
|
|
||||||
}
|
|
||||||
|
|
||||||
/ system script run [ find where name~"^daily-psk\\.(capsman|local)\$" ];
|
|
||||||
|
|
||||||
/ system scheduler set interval=0s $Scheduler;
|
|
||||||
}
|
|
Loading…
Reference in a new issue