mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
rotate-ntp: use $LogPrintExit
This commit is contained in:
parent
27e2635007
commit
71ae8cb75f
1 changed files with 4 additions and 2 deletions
|
@ -6,12 +6,14 @@
|
|||
|
||||
:global NtpPool;
|
||||
|
||||
:global LogPrintExit;
|
||||
|
||||
:local Ntp1 [ :resolve ("0." . $NtpPool) ];
|
||||
:local Ntp2 [ :resolve ("1." . $NtpPool) ];
|
||||
|
||||
:if ([ / system ntp client get enabled ] != true) do={
|
||||
:log warning "NTP client is not enabled!";
|
||||
$LogPrintExit warning "NTP client is not enabled!" true;
|
||||
}
|
||||
|
||||
:log info ("Updating NTP servers to " . $Ntp1 . " and " . $Ntp2);
|
||||
$LogPrintExit info ("Updating NTP servers to " . $Ntp1 . " and " . $Ntp2) false;
|
||||
/ system ntp client set primary-ntp=$Ntp1 secondary-ntp=$Ntp2;
|
||||
|
|
Loading…
Reference in a new issue