Add India specific info; simplify syntax

This commit is contained in:
Pothi Kalimuthu 2025-09-24 08:15:22 +05:30
parent 2c201f4a50
commit 326ac64fc9
No known key found for this signature in database
GPG key ID: 57069303D36E3093

View file

@ -2,33 +2,30 @@
# variables
# timezone
:local tz
:set tz "+05:30"
:local tz "+05:30"
# To be used as the primary NTP server
:local ipNTP
:local ipNTPcomment
# IP based NTP server - when DNS is unavailable.
:set ipNTP "128.138.140.44"
:set ipNTPcomment "From https://tf.nist.gov/tf-cgi/servers.cgi"
:local ipMainNTP "14.139.60.103"
:local ipMainNTPcomment "time.nplindia.in"
# To be used as the secondary NTP server
:local poolNTPorg
:set poolNTPorg [:resolve pool.ntp.org]
# To be used for DNS based NTP servers
:local ntp1
:local ntp2
:set ntp1 "time.cloudflare.com"
:set ntp2 "time.google.com"
:local ntp1 "time.nplindia.com"
:local ntp2 "time.cloudflare.com"
:local ntp3 "time.google.com"
:put "Primary NTP: $ipNTP ($ipNTPcomment)"
:put "Primary NTP: $ipMainNTP ($ipMainNTPcomment)"
:put "Secondary NTP: $poolNTPorg (pool.ntp.org)"
:put "DNS NTP 1: $ntp1"
:put "DNS NTP 2: $ntp2"
:put "DNS NTP 3: $ntp3"
# configure timezone
# /system clock manual set time-zone=$tz
/system clock manual set time-zone=$tz
:put "Timezone: $tz\n"
:put "Clock info..."
@ -46,10 +43,11 @@
if ( $rosVersion = 7 ) do={
/system ntp client servers
add address=128.138.140.44 comment="NIST.gov"
add address=$ipMainNTP comment=$ipMainNTPcomment
add address=[ :resolve pool.ntp.org ] comment="pool.ntp.org"
add address=time.google.com
add address=time.cloudflare.com
add address=$ntp1
add address=$ntp2
add address=$ntp3
}
/system ntp client set enabled=yes