forked from TrueCloudLab/certificates
Disable database if WithNoDB() option is passed
This commit removes the database from the configuration if the ca was initialized with the "--no-db" flag. Fixes #1292
This commit is contained in:
parent
23423814d3
commit
4fd9a9b92b
1 changed files with 5 additions and 0 deletions
|
@ -812,6 +812,11 @@ func (p *PKI) GenerateConfig(opt ...ConfigOption) (*authconfig.Config, error) {
|
||||||
Templates: p.getTemplates(),
|
Templates: p.getTemplates(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Disable the database when WithNoDB() option is passed.
|
||||||
|
if p.options.noDB {
|
||||||
|
cfg.DB = nil
|
||||||
|
}
|
||||||
|
|
||||||
// Add linked as a deployment type to detect it on start and provide a
|
// Add linked as a deployment type to detect it on start and provide a
|
||||||
// message if the token is not given.
|
// message if the token is not given.
|
||||||
if p.options.deploymentType == LinkedDeployment {
|
if p.options.deploymentType == LinkedDeployment {
|
||||||
|
|
Loading…
Reference in a new issue