Advertisement
Miguel-Brbyte

Atualização de data e hora MK

Sep 8th, 2021
1,722
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.64 KB | None | 0 0
  1. {
  2. :global name="TimeZone" value="-04:00"
  3. :global name="AddrNTP1" value="a.st1.ntp.br";
  4. :global name="AddrNTP2" value="b.st1.ntp.br";
  5. :global name="ResNTP1" value=[:resolve $AddrNTP1];
  6. :global name="ResNTP2" value=[:resolve $AddrNTP2];
  7. :global name="DNS" value=[/ip dns get servers];
  8. :global name="ENABLE" value="yes";
  9. :delay 3s
  10. :log warning "Inserindo time zone";
  11. /system clock manual
  12. set time-zone=$TimeZone;
  13. :log warning "configurado time zone";
  14. :delay 3s
  15. :log warning "Criando servidor NTP";
  16. /system ntp client
  17. set enabled=$ENABLE primary-ntp=$ResNTP1 secondary-ntp=$ResNTP2 server-dns-names=$DNS;
  18. :log warning "Servidor NTP criado";
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement