Skip to content
This repository was archived by the owner on Dec 17, 2021. It is now read-only.

Commit 633a991

Browse files
committed
commands/regeneratecerts: Add
1 parent a4cb7fc commit 633a991

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

commands/regeneratecerts.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package commands
2+
3+
import (
4+
"github.com/docker/machine/libmachine"
5+
"github.com/docker/machine/libmachine/log"
6+
)
7+
8+
func cmdRegenerateCerts(c CommandLine, api libmachine.API) error {
9+
if !c.Bool("force") {
10+
ok, err := confirmInput("Regenerate TLS machine certs? Warning: this is irreversible.")
11+
if err != nil {
12+
return err
13+
}
14+
15+
if !ok {
16+
return nil
17+
}
18+
}
19+
20+
log.Infof("Regenerating TLS certificates")
21+
22+
return runAction("configureAuth", c, api)
23+
}

0 commit comments

Comments
 (0)