tested on ubuntu 24.04

This commit is contained in:
allan 2024-11-08 11:06:34 +01:00
parent 67f58b2b33
commit 8cfeb68e4a
2 changed files with 6 additions and 5 deletions

View File

@ -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.

View File

@ -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
#