mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-10 10:04:28 +02:00
daily-psk-schedule: use $TimeIsSync
This commit is contained in:
parent
77ec3293f0
commit
6e8f5f19f6
1 changed files with 3 additions and 5 deletions
|
@ -5,6 +5,7 @@
|
|||
# schedule daily-psk on startup
|
||||
|
||||
:global MailServerIsUp;
|
||||
:global TimeIsSync;
|
||||
|
||||
:local Scheduler [ / system scheduler find where name="daily-psk-schedule" ];
|
||||
|
||||
|
@ -16,11 +17,8 @@
|
|||
:error "Warning: See log for details.";
|
||||
}
|
||||
|
||||
:if ([ / system ntp client get status ] != "synchronized") do={
|
||||
:if ([ / system resource get uptime ] > 5m) do={
|
||||
/ system script run [ find where name="rotate-ntp" ];
|
||||
}
|
||||
:log warning "Time is not yet synchronized from ntp.";
|
||||
:if ($TimeIsSync = false) do={
|
||||
:log warning "Time is not yet synchronized.";
|
||||
:error "Warning: See log for details.";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue