Browse Source

Add primary domain to certgroups internal var when starting from scratch with no existing domains.json

multicert
Ruel Tmeizeh - RuhNet 2 years ago
parent
commit
2e73b2c80f
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      api.go

+ 9
- 0
api.go View File

@ -168,6 +168,15 @@ func apiPutDomain(c echo.Context) error {
}
}
if len(certgroups) == 0 { //certgroups is empty, so start fresh
var cg CertGroup
cg.PrimaryDomain = appconf.PrimaryDomain
if domain != appconf.PrimaryDomain {
cg.Domains = append(cg.Domains, domain)
}
certgroups = append(certgroups, cg)
}
//write list to disk
err := writeDomains()
if err != nil {


Loading…
Cancel
Save