Refactored config system again
All checks were successful
Build (artifact) / build (push) Successful in 27s
All checks were successful
Build (artifact) / build (push) Successful in 27s
This commit is contained in:
@@ -48,7 +48,7 @@ func init() {
|
||||
|
||||
func renewCert(domain string) error {
|
||||
config := app.Config()
|
||||
domainConfig, exists := app.DomainStore().Get(domain)
|
||||
domainConfig, exists := app.ClientDomainStore().Get(domain)
|
||||
if !exists {
|
||||
return app.ErrConfigNotFound
|
||||
}
|
||||
@@ -62,17 +62,17 @@ func renewCert(domain string) error {
|
||||
if err := client.PullCerts(config, gitWorkspace); err != nil {
|
||||
return err
|
||||
}
|
||||
certsDir := common.EffectiveDataRoot(config, domainConfig)
|
||||
certsDir := common.EffectiveDataRoot(config, domainConfig.Certificates.DataRoot)
|
||||
return client.DecryptAndWriteCertificates(certsDir, config, domainConfig, gitWorkspace)
|
||||
}
|
||||
|
||||
func updateLinks(domain string) error {
|
||||
domainConfig, exists := app.DomainStore().Get(domain)
|
||||
domainConfig, exists := app.ClientDomainStore().Get(domain)
|
||||
if !exists {
|
||||
return fmt.Errorf("domain %s does not exist", domain)
|
||||
}
|
||||
|
||||
effectiveDataRoot := common.EffectiveDataRoot(app.Config(), domainConfig)
|
||||
effectiveDataRoot := common.EffectiveDataRoot(app.Config(), domainConfig.Certificates.DataRoot)
|
||||
certsDir := filepath.Join(effectiveDataRoot, "certificates", domain)
|
||||
|
||||
certLinks := domainConfig.Certificates.CertSymlinks
|
||||
|
||||
Reference in New Issue
Block a user