Skip to content

Commit c847ac4

Browse files
authored
feat(cli): add environment variable for specifying alternate directory URL (go-acme#2061)
1 parent 3ba40ff commit c847ac4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cmd/flags.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ func CreateFlags(defaultPath string) []cli.Flag {
1818
&cli.StringFlag{
1919
Name: "server",
2020
Aliases: []string{"s"},
21+
EnvVars: []string{"LEGO_SERVER"},
2122
Usage: "CA hostname (and optionally :port). The server certificate must be trusted in order to avoid further modifications to the client.",
2223
Value: lego.LEDirectoryProduction,
2324
},

docs/data/zz_cli_help.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ COMMANDS:
2020
2121
GLOBAL OPTIONS:
2222
--domains value, -d value [ --domains value, -d value ] Add a domain to the process. Can be specified multiple times.
23-
--server value, -s value CA hostname (and optionally :port). The server certificate must be trusted in order to avoid further modifications to the client. (default: "https://acme-v02.api.letsencrypt.org/directory")
23+
--server value, -s value CA hostname (and optionally :port). The server certificate must be trusted in order to avoid further modifications to the client. (default: "https://acme-v02.api.letsencrypt.org/directory") [$LEGO_SERVER]
2424
--accept-tos, -a By setting this flag to true you indicate that you accept the current Let's Encrypt terms of service. (default: false)
2525
--email value, -m value Email used for registration and recovery contact.
2626
--csr value, -c value Certificate signing request filename, if an external CSR is to be used.

0 commit comments

Comments
 (0)