tested on ubuntu 24.04
This commit is contained in:
parent
67f58b2b33
commit
8cfeb68e4a
@ -1,7 +1,7 @@
|
|||||||
## Ntp client install script for Ubuntu 22.04 server.
|
## Ntp client install script for Ubuntu 24.04 server.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
Ubuntu 20.04 or higher.
|
Ubuntu 24.04.
|
||||||
|
|
||||||
### Download the script
|
### 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)
|
More guides can be found on [\[wiki.x-files.dk\]](https://wiki.x-files.dk)
|
||||||
|
|
||||||
### Last tested
|
### Last tested
|
||||||
January 12th 2024 on Ubuntu 22.04.
|
November 8th 2024 on Ubuntu 24.04.
|
||||||
|
@ -27,11 +27,12 @@ timedatectl set-ntp off
|
|||||||
apt install -y ntpdate
|
apt install -y ntpdate
|
||||||
apt install -y ntp
|
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
|
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
|
systemctl restart ntp
|
||||||
|
rm ntpconf
|
||||||
#
|
#
|
||||||
# End of script
|
# End of script
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user