Skip to content

Instantly share code, notes, and snippets.

@devnulled
Created October 2, 2018 22:19
Show Gist options
  • Save devnulled/f76d93f109a99ea5f8e3da79abe9bbb2 to your computer and use it in GitHub Desktop.
Save devnulled/f76d93f109a99ea5f8e3da79abe9bbb2 to your computer and use it in GitHub Desktop.
Simple shell script to install crony on boot in the Kubernetes version of Debian to use AWS time servers. Other keywords: time, sync, ntp, ntpd
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
apt-get -q -y install chrony --no-install-recommends
sed -i 's/pool 2.debian.pool.ntp.org iburst/server 169.254.169.123 prefer iburst/g' /etc/chrony/chrony.conf
systemctl restart chrony
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment