diff --git a/files/chrony-specific/10-dhcp-chrony b/files/chrony-specific/10-dhcp-chrony new file mode 100644 index 0000000..38f794b --- /dev/null +++ b/files/chrony-specific/10-dhcp-chrony @@ -0,0 +1,10 @@ +#!/bin/sh +if [ "$2" = "up" ]; then + if [ -n "$DHCP4_NTP_SERVERS" ]; then + chronyc delete sources + for server in $DHCP4_NTP_SERVERS; do + chronyc add server $server iburst + done + systemctl restart chronyd + fi +fi \ No newline at end of file