some bug fixes

This commit is contained in:
ston1th 2019-08-29 19:29:53 +02:00
commit 577cf4d482
10 changed files with 83 additions and 17 deletions

View file

@ -125,6 +125,30 @@ func loadConfig() error {
if err != nil {
return err
}
if config.RunDir == "" {
config.RunDir = defRunDir
}
if config.User == "" {
config.User = defRunUser
}
if config.Group == "" {
config.Group = defRunGroup
}
if config.ListenAddr == "" {
config.ListenAddr = defListen
}
if config.LogFile == "" {
config.LogFile = defLogFile
}
if config.CMDTimeout == 0 {
config.CMDTimeout = defTimeout
}
if config.TesseractThreads == 0 {
config.TesseractThreads = tesseractThreads
}
if config.TesseractOEM == 0 {
config.TesseractOEM = tesseractOEM
}
return file.Close()
}