From e1f134ead584c7b2e9ed406f5520d7f1a23294aa Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 5 Jul 2018 15:29:26 +0200 Subject: add scripts --- rotate-ntp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 rotate-ntp (limited to 'rotate-ntp') diff --git a/rotate-ntp b/rotate-ntp new file mode 100644 index 0000000..07672fb --- /dev/null +++ b/rotate-ntp @@ -0,0 +1,12 @@ +# RouterOS script: rotate-ntp +# Copyright (c) 2013-2018 Christian Hesse +# +# 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; -- cgit v1.2.3-70-g09d2