Skip to content

Commit

Permalink
Add default configuration values
Browse files Browse the repository at this point in the history
Address issue letsencrypt#297
  • Loading branch information
AdamBark committed Jul 24, 2020
1 parent 05f79ba commit f933203
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cmd/pebble/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ type config struct {
}
}

func setConfigDefaults() (config) {
var conf config
conf.Pebble.ListenAddress = "0.0.0.0:14000"
conf.Pebble.ManagementListenAddress = "0.0.0.0:15000"
conf.Pebble.Certificate = "test/certs/localhost/cert.pem"
conf.Pebble.PrivateKey = "test/certs/localhost/key.pem"
conf.Pebble.HTTPPort = 5002
conf.Pebble.TLSPort = 5001
return conf
}

func main() {
configFile := flag.String(
"config",
Expand All @@ -52,7 +63,7 @@ func main() {
logger := log.New(os.Stdout, "Pebble ", log.LstdFlags)
logger.Printf("Starting Pebble ACME server")

var c config
c := setConfigDefaults()
err := cmd.ReadConfigFile(*configFile, &c)
cmd.FailOnError(err, "Reading JSON config file into config structure")

Expand Down

0 comments on commit f933203

Please sign in to comment.