- "update_timesyncd.sh": "#!/usr/bin/env bash\n\nset -euo pipefail\n\nsystemctl disable --now systemd-timesyncd\napt install -y chrony\n\ncat >/etc/chrony/chrony.conf <<EOF\npool time.aws.com iburst\n\n# Use time sources from DHCP.\nsourcedir /run/chrony-dhcp\n\n# This directive specify the location of the file containing ID/key pairs for\n# NTP authentication.\nkeyfile /etc/chrony/chrony.keys\n\n# This directive specify the file into which chronyd will store the rate\n# information.\ndriftfile /var/lib/chrony/chrony.drift\n\n# Save NTS keys and cookies.\nntsdumpdir /var/lib/chrony\n\n# Uncomment the following line to turn logging on.\n#log tracking measurements statistics\n\n# Log files location.\nlogdir /var/log/chrony\n\n# Stop bad estimates upsetting machine clock.\nmaxupdateskew 100.0\n\n# This directive enables kernel synchronisation (every 11 minutes) of the\n# real-time clock. Note that it can’t be used along with the 'rtcfile' directive.\nrtcsync\n\n# Step the system clock instead of slewing it if the adjustment is larger than\n# one second, but only in the first three clock updates.\nmakestep 1 3\n\n# Get TAI-UTC offset and leap seconds from the system tz database.\n# This directive must be commented out when using time sources serving\n# leap-smeared time.\nleapsectz right/UTC\nEOF\n\nservice chrony force-reload\nchronyc tracking",
0 commit comments