From 6e5dbeda72b26ab29fbf8f9c89265534a3ae4ba8 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Tue, 1 Oct 2024 17:37:39 +0800 Subject: [PATCH] update --- scripts/install/debian.sh | 16 ++++++++++------ scripts/install/ubuntu.sh | 4 ++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index c000fc335..a94132d8f 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -27,13 +27,17 @@ if [ "$VERSION_ID" == "10" ];then fi +# synchronize server +apt install chrony -y + # synchronize time first -apt-get install ntpdate -y -NTPHOST='time.nist.gov' -if [ ! -z "$cn" ];then - NTPHOST='ntp1.aliyun.com' -fi -ntpdate $NTPHOST | logger -t NTP +apt install ntpdate -y +# NTPHOST='time.nist.gov' +# if [ ! -z "$cn" ];then +# NTPHOST='ntp1.aliyun.com' +# fi +# ntpdate ntp1.aliyun.com | logger -t NTP +# ntpdate $NTPHOST | logger -t NTP apt install -y net-tools diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index bad4bebaa..8233a10fd 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -15,6 +15,10 @@ if grep -Eq "Ubuntu" /etc/*-release; then #sudo dpkg-reconfigure dash fi +# synchronize server +apt install chrony -y +apt install ntpdate -y + apt update -y apt autoremove -y