Allow `0` value to disable ScanSchedule.

Seems that Viper does not recognize empty environment vars as valid values

Closes #1274
This commit is contained in:
Deluan 2021-08-03 19:37:36 -04:00
parent e9d0abe0bc
commit b44ef81c6f
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ func validateScanSchedule() error {
log.Warn("Setting ScanSchedule", "schedule", Server.ScanSchedule)
}
}
if Server.ScanSchedule == "" {
if Server.ScanSchedule == "0" || Server.ScanSchedule == "" {
return nil
}
if _, err := time.ParseDuration(Server.ScanSchedule); err == nil {