时钟同步增加是否检查chrony选项

This commit is contained in:
GoEdgeLab
2022-11-03 14:58:32 +08:00
parent 5c40f6f8bd
commit aaabee2f6d
2 changed files with 9 additions and 0 deletions

View File

@@ -122,6 +122,7 @@ func (this *IndexAction) RunPost(params struct {
AutoOpenPorts bool AutoOpenPorts bool
ClockAutoSync bool ClockAutoSync bool
ClockServer string ClockServer string
ClockCheckChrony bool
AutoRemoteStart bool AutoRemoteStart bool
AutoInstallNftables bool AutoInstallNftables bool
@@ -154,6 +155,7 @@ func (this *IndexAction) RunPost(params struct {
var clockConfig = nodeconfigs.DefaultClockConfig() var clockConfig = nodeconfigs.DefaultClockConfig()
clockConfig.AutoSync = params.ClockAutoSync clockConfig.AutoSync = params.ClockAutoSync
clockConfig.Server = params.ClockServer clockConfig.Server = params.ClockServer
clockConfig.CheckChrony = params.ClockCheckChrony
clockConfigJSON, err := json.Marshal(clockConfig) clockConfigJSON, err := json.Marshal(clockConfig)
if err != nil { if err != nil {
this.ErrorPage(err) this.ErrorPage(err)

View File

@@ -85,6 +85,13 @@
<p class="comment">可选项。默认使用<code-label>pool.ntp.org</code-label></p> <p class="comment">可选项。默认使用<code-label>pool.ntp.org</code-label></p>
</td> </td>
</tr> </tr>
<tr v-show="cluster.clock.autoSync">
<td class="color-border">检查Chrony</td>
<td>
<checkbox name="clockCheckChrony" v-model="cluster.clock.checkChrony"></checkbox>
<p class="comment">选中后表示如果chrony另一款时间同步软件正在运行则不重复执行时间同步。</p>
</td>
</tr>
<tr> <tr>
<td>自动远程启动</td> <td>自动远程启动</td>
<td> <td>