mirror of
https://github.com/pothi/mikrotik-scripts.git
synced 2025-12-06 10:09:30 +00:00
Add India specific info; simplify syntax
This commit is contained in:
parent
2c201f4a50
commit
326ac64fc9
1 changed files with 13 additions and 15 deletions
|
|
@ -2,33 +2,30 @@
|
||||||
|
|
||||||
# variables
|
# variables
|
||||||
# timezone
|
# timezone
|
||||||
:local tz
|
:local tz "+05:30"
|
||||||
:set tz "+05:30"
|
|
||||||
|
|
||||||
# To be used as the primary NTP server
|
# To be used as the primary NTP server
|
||||||
:local ipNTP
|
|
||||||
:local ipNTPcomment
|
|
||||||
# IP based NTP server - when DNS is unavailable.
|
# IP based NTP server - when DNS is unavailable.
|
||||||
:set ipNTP "128.138.140.44"
|
:local ipMainNTP "14.139.60.103"
|
||||||
:set ipNTPcomment "From https://tf.nist.gov/tf-cgi/servers.cgi"
|
:local ipMainNTPcomment "time.nplindia.in"
|
||||||
|
|
||||||
# To be used as the secondary NTP server
|
# To be used as the secondary NTP server
|
||||||
:local poolNTPorg
|
:local poolNTPorg
|
||||||
:set poolNTPorg [:resolve pool.ntp.org]
|
:set poolNTPorg [:resolve pool.ntp.org]
|
||||||
|
|
||||||
# To be used for DNS based NTP servers
|
# To be used for DNS based NTP servers
|
||||||
:local ntp1
|
:local ntp1 "time.nplindia.com"
|
||||||
:local ntp2
|
:local ntp2 "time.cloudflare.com"
|
||||||
:set ntp1 "time.cloudflare.com"
|
:local ntp3 "time.google.com"
|
||||||
:set ntp2 "time.google.com"
|
|
||||||
|
|
||||||
:put "Primary NTP: $ipNTP ($ipNTPcomment)"
|
:put "Primary NTP: $ipMainNTP ($ipMainNTPcomment)"
|
||||||
:put "Secondary NTP: $poolNTPorg (pool.ntp.org)"
|
:put "Secondary NTP: $poolNTPorg (pool.ntp.org)"
|
||||||
:put "DNS NTP 1: $ntp1"
|
:put "DNS NTP 1: $ntp1"
|
||||||
:put "DNS NTP 2: $ntp2"
|
:put "DNS NTP 2: $ntp2"
|
||||||
|
:put "DNS NTP 3: $ntp3"
|
||||||
|
|
||||||
# configure timezone
|
# configure timezone
|
||||||
# /system clock manual set time-zone=$tz
|
/system clock manual set time-zone=$tz
|
||||||
:put "Timezone: $tz\n"
|
:put "Timezone: $tz\n"
|
||||||
:put "Clock info..."
|
:put "Clock info..."
|
||||||
|
|
||||||
|
|
@ -46,10 +43,11 @@
|
||||||
|
|
||||||
if ( $rosVersion = 7 ) do={
|
if ( $rosVersion = 7 ) do={
|
||||||
/system ntp client servers
|
/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=[ :resolve pool.ntp.org ] comment="pool.ntp.org"
|
||||||
add address=time.google.com
|
add address=$ntp1
|
||||||
add address=time.cloudflare.com
|
add address=$ntp2
|
||||||
|
add address=$ntp3
|
||||||
}
|
}
|
||||||
|
|
||||||
/system ntp client set enabled=yes
|
/system ntp client set enabled=yes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue