diff options
author | Christian Hesse <mail@eworm.de> | 2016-09-20 13:48:04 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2016-09-20 13:48:04 +0200 |
commit | b3c19f9ad1853db207c498d4120d9466f5404076 (patch) | |
tree | 7c17021acce0c3d05c839fb54d84f4fe87493196 | |
parent | 09ea6a0778a0e095f89925396338c72f1881ebfd (diff) | |
download | networkmanager-dispatcher-timesyncd-b3c19f9ad1853db207c498d4120d9466f5404076.tar.gz networkmanager-dispatcher-timesyncd-b3c19f9ad1853db207c498d4120d9466f5404076.tar.zst |
restart systemd-timesyncd if NTP server is available
-rwxr-xr-x | 30-timesyncd | 5 |
1 files changed, 4 insertions, 1 deletions
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) |