Added a configurable update interval for WWClient
This commit is contained in:
@@ -91,6 +91,10 @@ func main() {
|
||||
log.Printf("ERROR: Failed running CPIO: %s\n", err)
|
||||
}
|
||||
|
||||
time.Sleep(30000 * time.Millisecond)
|
||||
if conf.Warewulf.UpdateInterval > 0 {
|
||||
time.Sleep(time.Duration(conf.Warewulf.UpdateInterval*1000) * time.Millisecond)
|
||||
} else {
|
||||
time.Sleep(30000 * time.Millisecond * 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ netmask: 255.255.255.0
|
||||
warewulf:
|
||||
port: 9873
|
||||
secure: true
|
||||
update interval: 60
|
||||
dhcp:
|
||||
enabled: true
|
||||
range start: 192.168.1.150
|
||||
|
||||
@@ -20,10 +20,11 @@ type ControllerConf struct {
|
||||
}
|
||||
|
||||
type WarewulfConf struct {
|
||||
Port int `yaml:"port,omitempty"`
|
||||
Secure bool `yaml:"secure,omitempty"`
|
||||
Enable string `yaml:"enable command,omitempty"`
|
||||
Restart string `yaml:"restart command,omitempty"`
|
||||
Port int `yaml:"port,omitempty"`
|
||||
Secure bool `yaml:"secure,omitempty"`
|
||||
Enable string `yaml:"enable command,omitempty"`
|
||||
Restart string `yaml:"restart command,omitempty"`
|
||||
UpdateInterval int `yaml:"update interval,omitempty"`
|
||||
}
|
||||
|
||||
type DhcpConf struct {
|
||||
|
||||
Reference in New Issue
Block a user