From 8cfeb68e4a4dfddde11e34f8c465ccfcafbd26ee Mon Sep 17 00:00:00 2001 From: allan Date: Fri, 8 Nov 2024 11:06:34 +0100 Subject: [PATCH] tested on ubuntu 24.04 --- README.md | 6 +++--- ntp-client-install | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bfdbcb2..b3223df 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -## Ntp client install script for Ubuntu 22.04 server. +## Ntp client install script for Ubuntu 24.04 server. ### Prerequisites -Ubuntu 20.04 or higher. +Ubuntu 24.04. ### Download the script ``` @@ -22,4 +22,4 @@ Nothing to do. More guides can be found on [\[wiki.x-files.dk\]](https://wiki.x-files.dk) ### Last tested -January 12th 2024 on Ubuntu 22.04. +November 8th 2024 on Ubuntu 24.04. diff --git a/ntp-client-install b/ntp-client-install index 5d43a39..d1dde6c 100755 --- a/ntp-client-install +++ b/ntp-client-install @@ -27,11 +27,12 @@ timedatectl set-ntp off apt install -y ntpdate apt install -y ntp -sed -i '/ubuntu.pool.ntp.org/ s/^/# /g' /etc/ntp.conf +sed -i '/ubuntu.pool.ntp.org/ s/^/# /g' /etc/ntpsec/ntp.conf printf '%s\n' "${ntpconf[@]}" |sed '$d' > ntpconf -sed -i "/Specify one/r ntpconf" /etc/ntp.conf +sed -i "/Specify one/r ntpconf" /etc/ntpsec/ntp.conf systemctl restart ntp +rm ntpconf # # End of script #