mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $TimeIsSync: unbreak with bundled ntp client
This commit is contained in:
@ -640,9 +640,16 @@
|
||||
|
||||
# check if system time is sync
|
||||
:set TimeIsSync do={
|
||||
:if ([ / system ntp client get enabled ] = true && \
|
||||
[ / system ntp client get status ] = "synchronized") do={
|
||||
:return true;
|
||||
:if ([ / system ntp client get enabled ] = true) do={
|
||||
:do {
|
||||
:if ([ / system ntp client get status ] = "synchronized") do={
|
||||
:return true;
|
||||
}
|
||||
} on-error={
|
||||
:if ([ :typeof [ / system ntp client get last-adjustment ] ] = "time") do={
|
||||
:return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:if ([ / ip cloud get update-time ] = true && \
|
||||
|
Reference in New Issue
Block a user