summaryrefslogtreecommitdiff
path: root/cmd/commands.go
diff options
context:
space:
mode:
authorFrancis Lavoie <lavofr@gmail.com>2022-03-02 13:08:36 -0500
committerGitHub <noreply@github.com>2022-03-02 11:08:36 -0700
commitbbad6931e30a2e74b3f53fff797d1115cc9dd491 (patch)
tree4db78522ec9b352b2f27f2f3a11dfa1a314ee902 /cmd/commands.go
parent5bd96a6ac22849cd9fbbaae5285f0161e272b8e4 (diff)
pki: Implement API endpoints for certs and `caddy trust` (#4443)
* admin: Implement /pki/certificates/<id> API * pki: Lower "skip_install_trust" log level to INFO See https://github.com/caddyserver/caddy/issues/4058#issuecomment-976132935 It's not necessary to warn about this, because this was an option explicitly configured by the user. Still useful to log, but we don't need to be so loud about it. * cmd: Export functions needed for PKI app, return API response to caller * pki: Rewrite `caddy trust` command to use new admin endpoint instead * pki: Rewrite `caddy untrust` command to support using admin endpoint * Refactor cmd and pki packages for determining admin API endpoint
Diffstat (limited to 'cmd/commands.go')
-rw-r--r--cmd/commands.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/commands.go b/cmd/commands.go
index 1e2c40d..0c68b7c 100644
--- a/cmd/commands.go
+++ b/cmd/commands.go
@@ -156,16 +156,19 @@ development environment.`,
RegisterCommand(Command{
Name: "stop",
Func: cmdStop,
+ Usage: "[--address <interface>] [--config <path> [--adapter <name>]]",
Short: "Gracefully stops a started Caddy process",
Long: `
Stops the background Caddy process as gracefully as possible.
It requires that the admin API is enabled and accessible, since it will
-use the API's /stop endpoint. The address of this request can be
-customized using the --address flag if it is not the default.`,
+use the API's /stop endpoint. The address of this request can be customized
+using the --address flag, or from the given --config, if not the default.`,
Flags: func() *flag.FlagSet {
fs := flag.NewFlagSet("stop", flag.ExitOnError)
fs.String("address", "", "The address to use to reach the admin API endpoint, if not the default")
+ fs.String("config", "", "Configuration file to use to parse the admin address, if --address is not used")
+ fs.String("adapter", "", "Name of config adapter to apply (when --config is used)")
return fs
}(),
})