mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-22 11:54:44 +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
|
||||
:set TimeIsSync do={
|
||||
:global LogPrintExit;
|
||||
|
||||
:if ([ / system ntp client get enabled ] = true) do={
|
||||
:do {
|
||||
:if ([ / system ntp client get status ] = "synchronized") do={
|
||||
|
@ -783,6 +785,7 @@
|
|||
:return false;
|
||||
}
|
||||
|
||||
$LogPrintExit warning ("No time source configured!") false;
|
||||
:return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue