From b3c19f9ad1853db207c498d4120d9466f5404076 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 20 Sep 2016 13:48:04 +0200 Subject: restart systemd-timesyncd if NTP server is available --- 30-timesyncd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/30-timesyncd b/30-timesyncd index 2276cbb..a56652f 100755 --- a/30-timesyncd +++ b/30-timesyncd @@ -13,7 +13,10 @@ case "${STATUS}" in echo "[Time]" >> /run/systemd/timesyncd.conf.d/${INTERFACE}.conf echo "NTP = ${DHCP4_NTP_SERVERS}" >> /run/systemd/timesyncd.conf.d/${INTERFACE}.conf - timedatectl set-ntp true + # systemd-timesyncd does not notice changed configuration. So if it is + # already running 'timedatectl set-ntp true' does not work. + # Restart the service instead. + systemctl restart systemd-timesyncd.service fi ;; down) -- cgit v1.2.3-70-g09d2