1
0
mirror of https://github.com/rancher/os.git synced 2025-09-14 14:11:18 +00:00

Run user docker with a configurable storage context

This commit is contained in:
Darren Shepherd
2015-08-27 01:58:45 -07:00
parent d46e9530b9
commit ab6eb58167
8 changed files with 337 additions and 23 deletions

View File

@@ -131,13 +131,19 @@ func tlsConfCreate(c *cli.Context) {
}
func generate(c *cli.Context) error {
generateServer := c.Bool("server")
outDir := c.String("dir")
hostnames := c.StringSlice("hostname")
return Generate(generateServer, outDir, hostnames)
}
func Generate(generateServer bool, outDir string, hostnames []string) error {
cfg, err := config.LoadConfig()
if err != nil {
return err
}
generateServer := c.Bool("server")
outDir := c.String("dir")
if outDir == "" {
return fmt.Errorf("out directory (-d, --dir) not specified")
}
@@ -161,6 +167,5 @@ func generate(c *cli.Context) error {
return err
}
hostnames := c.StringSlice("hostname")
return writeCerts(generateServer, hostnames, cfg, certPath, keyPath, caCertPath, caKeyPath)
}