aboutsummaryrefslogtreecommitdiffstats
path: root/rotate-ntp
blob: 07672fb72a817c3d496780c53678e47d9e286e1a (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
# RouterOS script: rotate-ntp
# Copyright (c) 2013-2018 Christian Hesse <mail@eworm.de>
#
# rotate the ntp servers

:global "ntp-pool";

:local ntp1 [ :resolve ("0." . $"ntp-pool") ];
:local ntp2 [ :resolve ("1." . $"ntp-pool") ];

:log info ("Updating NTP servers to " . $ntp1 . " and " . $ntp2);
/ system ntp client set primary-ntp=$ntp1 secondary-ntp=$ntp2;