forked from TrueCloudLab/lego
Remove CA path from config dir.
This commit is contained in:
parent
37b20117bf
commit
0f32c176d7
3 changed files with 32 additions and 42 deletions
10
cli.go
10
cli.go
|
@ -24,7 +24,7 @@ func main() {
|
||||||
app := cli.NewApp()
|
app := cli.NewApp()
|
||||||
app.Name = "lego"
|
app.Name = "lego"
|
||||||
app.Usage = "Let's encrypt client to go!"
|
app.Usage = "Let's encrypt client to go!"
|
||||||
app.Version = "0.0.1"
|
app.Version = "0.0.2"
|
||||||
|
|
||||||
cwd, err := os.Getwd()
|
cwd, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -103,14 +103,6 @@ func main() {
|
||||||
Value: 2048,
|
Value: 2048,
|
||||||
Usage: "Size of the RSA key.",
|
Usage: "Size of the RSA key.",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
|
||||||
Name: "no-confirm",
|
|
||||||
Usage: "Turn off confirmation screens.",
|
|
||||||
},
|
|
||||||
cli.BoolFlag{
|
|
||||||
Name: "agree-tos, e",
|
|
||||||
Usage: "Skip the end user license agreement screen.",
|
|
||||||
},
|
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "path",
|
Name: "path",
|
||||||
Usage: "Directory to use for storing the data",
|
Usage: "Directory to use for storing the data",
|
||||||
|
|
|
@ -49,12 +49,11 @@ func run(c *cli.Context) {
|
||||||
You should make a secure backup of this folder now. This
|
You should make a secure backup of this folder now. This
|
||||||
configuration directory will also contain certificates and
|
configuration directory will also contain certificates and
|
||||||
private keys obtained from Let's Encrypt so making regular
|
private keys obtained from Let's Encrypt so making regular
|
||||||
backups of this folder is ideal.`, c.GlobalString("config-dir"))
|
backups of this folder is ideal.`, conf.AccountPath(c.GlobalString("email")))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if acc.Registration.Body.Agreement == "" {
|
if acc.Registration.Body.Agreement == "" {
|
||||||
if !c.GlobalBool("agree-tos") {
|
|
||||||
reader := bufio.NewReader(os.Stdin)
|
reader := bufio.NewReader(os.Stdin)
|
||||||
logger().Printf("Please review the TOS at %s", acc.Registration.TosURL)
|
logger().Printf("Please review the TOS at %s", acc.Registration.TosURL)
|
||||||
|
|
||||||
|
@ -83,7 +82,6 @@ func run(c *cli.Context) {
|
||||||
logger().Println("Your input was invalid. Please answer with one of Y/y, n or by pressing enter.")
|
logger().Println("Your input was invalid. Please answer with one of Y/y, n or by pressing enter.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if !c.GlobalIsSet("domains") {
|
if !c.GlobalIsSet("domains") {
|
||||||
logger().Fatal("Please specify --domains")
|
logger().Fatal("Please specify --domains")
|
||||||
|
|
|
@ -31,7 +31,7 @@ func (c *Configuration) OptPort() string {
|
||||||
// ServerPath returns the OS dependent path to the data for a specific CA
|
// ServerPath returns the OS dependent path to the data for a specific CA
|
||||||
func (c *Configuration) ServerPath() string {
|
func (c *Configuration) ServerPath() string {
|
||||||
srv, _ := url.Parse(c.context.GlobalString("server"))
|
srv, _ := url.Parse(c.context.GlobalString("server"))
|
||||||
srvStr := strings.Replace(srv.Host, ":", "_", -1) + srv.Path
|
srvStr := strings.Replace(srv.Host, ":", "_", -1)
|
||||||
return strings.Replace(srvStr, "/", string(os.PathSeparator), -1)
|
return strings.Replace(srvStr, "/", string(os.PathSeparator), -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue