add host auto updated setting with default true

This commit is contained in:
Anish Mukherjee 2023-03-20 17:47:41 +05:30
parent a3bc0fd2e8
commit 6b684d95a4
2 changed files with 2 additions and 0 deletions

View file

@ -97,6 +97,7 @@ func CreateHost(h *models.Host) error {
return err
}
h.HostPass = string(hash)
h.AutoUpdate = true
// if another server has already updated proxyenabled, leave it alone
if !h.ProxyEnabledSet {
log.Println("checking default proxy", servercfg.GetServerConfig().DefaultProxyMode)

View file

@ -33,6 +33,7 @@ type Host struct {
Version string `json:"version" yaml:"version"`
IPForwarding bool `json:"ipforwarding" yaml:"ipforwarding"`
DaemonInstalled bool `json:"daemoninstalled" yaml:"daemoninstalled"`
AutoUpdate bool `json:"autoupdate" yaml:"autoupdate"`
HostPass string `json:"hostpass" yaml:"hostpass"`
Name string `json:"name" yaml:"name"`
OS string `json:"os" yaml:"os"`