From a39f1eae4e7f0a72b8b311cdb744618664681917 Mon Sep 17 00:00:00 2001 From: Elston LEWIS Date: Thu, 24 Oct 2024 14:41:03 +0200 Subject: [PATCH] Renamed chrony file --- files/chrony-specific/10-dhcp-chrony | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 files/chrony-specific/10-dhcp-chrony 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