Added a configurable update interval for WWClient

This commit is contained in:
Gregory Kurtzer
2020-12-03 19:14:40 -08:00
parent e30728b16d
commit df96dee6be
3 changed files with 11 additions and 5 deletions

View File

@@ -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)
}
}
}