add config ssl file check
This commit is contained in:
@@ -76,5 +76,17 @@ func LoadConfig(p ...string) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
if exists := utils.CheckExists(conf.Database.SSLCa, false); !exists {
|
||||
return errors.New("ssl ca file not exists")
|
||||
}
|
||||
|
||||
if exists := utils.CheckExists(conf.Database.SSLCrt, false); !exists {
|
||||
return errors.New("ssl crt file not exists")
|
||||
}
|
||||
|
||||
if exists := utils.CheckExists(conf.Database.SSLKey, false); !exists {
|
||||
return errors.New("ssl key file not exists")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user