add config ssl file check
This commit is contained in:
1 parent
c1f0ae6b9b
commit
45c8fc4f0e
2 files changed
+22
-2
No files matched your search
@@ -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