[agent][deploy] - ImageSyncDLTU.sh - add LTU part
This commit is contained in:
@@ -2329,8 +2329,7 @@ func (op *AgentOsOperator) installChronyByDockerExec(funcArgs []string) (bool, [
|
||||
}
|
||||
}
|
||||
|
||||
// run docker command
|
||||
ok, resultLog := AllCommandExecutor([]string{
|
||||
chronyCommand := []string{
|
||||
"docker",
|
||||
"run",
|
||||
"--name=chrony",
|
||||
@@ -2338,12 +2337,20 @@ func (op *AgentOsOperator) installChronyByDockerExec(funcArgs []string) (bool, [
|
||||
"--detach",
|
||||
"--cap-add=SYS_TIME",
|
||||
"--publish=123:123/udp",
|
||||
"--env=NTP_SERVERS=\"ntp1.aliyun.com,ntp2.aliyun.com,ntp3.aliyun.com,ntp4.aliyun.com\"",
|
||||
"--env=LOG_LEVEL=0",
|
||||
"--env=TZ=Asia/Shanghai",
|
||||
"--env=ENABLE_SYSCLK=true",
|
||||
funcArgs[0] + ":8033/cmii/chronyd:0.4.3",
|
||||
})
|
||||
}
|
||||
if op.CanAccessInternet {
|
||||
chronyCommand = append(chronyCommand, "--env=NTP_SERVERS=\"ntp1.aliyun.com,ntp2.aliyun.com,ntp3.aliyun.com,ntp4.aliyun.com\"")
|
||||
} else {
|
||||
chronyCommand = append(chronyCommand, "--env=NTP_SERVERS=127.127.1.1")
|
||||
}
|
||||
|
||||
chronyCommand = append(chronyCommand, funcArgs[0]+":8033/cmii/chronyd:0.4.3")
|
||||
|
||||
// run docker command
|
||||
ok, resultLog := AllCommandExecutor(chronyCommand)
|
||||
if !ok {
|
||||
return false, append(resultLog, "[installChronyByDockerExec] - docker chrony run error !")
|
||||
}
|
||||
@@ -2456,6 +2463,8 @@ func (op *AgentOsOperator) chronyToMasterExec(args []string) (bool, []string) {
|
||||
}
|
||||
}
|
||||
|
||||
// ubuntu
|
||||
|
||||
// modify the systemd-timesync.service
|
||||
ntpFile := "/etc/systemd/timesyncd.conf"
|
||||
AllCommandExecutor([]string{
|
||||
|
||||
Reference in New Issue
Block a user