mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-23 12:24:28 +02:00
global-functions: $TimeIsSync: warn on missing time source
This commit is contained in:
parent
7febb6a0f4
commit
8c988ac55a
1 changed files with 3 additions and 0 deletions
|
@ -763,6 +763,8 @@
|
||||||
|
|
||||||
# check if system time is sync
|
# check if system time is sync
|
||||||
:set TimeIsSync do={
|
:set TimeIsSync do={
|
||||||
|
:global LogPrintExit;
|
||||||
|
|
||||||
:if ([ / system ntp client get enabled ] = true) do={
|
:if ([ / system ntp client get enabled ] = true) do={
|
||||||
:do {
|
:do {
|
||||||
:if ([ / system ntp client get status ] = "synchronized") do={
|
:if ([ / system ntp client get status ] = "synchronized") do={
|
||||||
|
@ -783,6 +785,7 @@
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$LogPrintExit warning ("No time source configured!") false;
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue